From 1e45858ee6e40da932be301e39d3fced6b393490 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 30 Jan 2015 11:16:55 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 5 +++++ qt-ui/profile/profilewidget2.h | 1 + 2 files changed, 6 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 57c89b99f..db3d0be35 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -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() diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h index abcf9fd23..a25780c7e 100644 --- a/qt-ui/profile/profilewidget2.h +++ b/qt-ui/profile/profilewidget2.h @@ -82,6 +82,7 @@ public: double getFontPrintScale(); void setFontPrintScale(double scale); void clearHandlers(); + void recalcCeiling(); void setToolTipVisibile(bool visible); State currentState; -- cgit v1.2.3-70-g09d2