mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:43:24 +00:00
Update ceiling when changing dive mode
Without this patch, the user effectively cannot change the dive mode as any change is overwritten by replot copying current_dive over displayed_dive. The way out is not to call replot but only update the deco ceiling directly. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c70ba77199
commit
1e45858ee6
3 changed files with 7 additions and 1 deletions
|
@ -1018,7 +1018,7 @@ void MainTab::divetype_Changed(int index)
|
|||
displayed_dive.dc.divemode = (enum dive_comp_type) index;
|
||||
update_setpoint_events(&displayed_dive.dc);
|
||||
markChangedWidget(ui.DiveType);
|
||||
MainWindow::instance()->graphics()->replot();
|
||||
MainWindow::instance()->graphics()->recalcCeiling();
|
||||
}
|
||||
|
||||
void MainTab::on_watertemp_textChanged(const QString &text)
|
||||
|
|
|
@ -648,6 +648,11 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
void ProfileWidget2::recalcCeiling()
|
||||
{
|
||||
diveCeiling->recalc();
|
||||
}
|
||||
|
||||
void ProfileWidget2::settingsChanged()
|
||||
{
|
||||
// if we are showing calculated ceilings then we have to replot()
|
||||
|
|
|
@ -82,6 +82,7 @@ public:
|
|||
double getFontPrintScale();
|
||||
void setFontPrintScale(double scale);
|
||||
void clearHandlers();
|
||||
void recalcCeiling();
|
||||
void setToolTipVisibile(bool visible);
|
||||
State currentState;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue