summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/diveplanner.cpp1
-rw-r--r--profile-widget/profilewidget2.cpp1
-rw-r--r--profile-widget/profilewidget2.h4
3 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index e4f572498..350371921 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -663,7 +663,6 @@ void PlannerWidgets::replanDive()
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
MainWindow::instance()->graphics->setPlanState();
- MainWindow::instance()->graphics->clearHandlers();
plannerWidget.setReplanButton(true);
plannerWidget.setupStartTime(timestampToDateTime(current_dive->when));
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 3d6348bb5..342c60e90 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1352,6 +1352,7 @@ void ProfileWidget2::setPlanState()
if (currentState == PLAN)
return;
+ clearHandlers();
setProfileState();
mouseFollowerHorizontal->setVisible(true);
mouseFollowerVertical->setVisible(true);
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index e6f06a7b2..26552e578 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -87,7 +87,6 @@ public:
void setFontPrintScale(double scale);
#ifndef SUBSURFACE_MOBILE
bool eventFilter(QObject *, QEvent *) override;
- void clearHandlers();
#endif
void setToolTipVisibile(bool visible);
State currentState;
@@ -164,6 +163,9 @@ private:
void createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
const double *thresholdSettingsMin, const double *thresholdSettingsMax);
void clearPictures();
+#ifndef SUBSURFACE_MOBILE
+ void clearHandlers();
+#endif
void plotPicturesInternal(const struct dive *d, bool synchronous);
void addDivemodeSwitch(int seconds, int divemode);
void addBookmark(int seconds);