mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
profile: call clearHandlers() in setPlanState()
This function, which removes the handlers from the profile, was called in setAddState() but not in setPlanState(). In the latter case it was called explicitly by the caller. Move the call from the caller into the function. This allows us to make clearHandlers() private in to the profile widget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bb76cb56d4
commit
674c20227b
3 changed files with 4 additions and 2 deletions
|
@ -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));
|
||||
|
|
|
@ -1352,6 +1352,7 @@ void ProfileWidget2::setPlanState()
|
|||
if (currentState == PLAN)
|
||||
return;
|
||||
|
||||
clearHandlers();
|
||||
setProfileState();
|
||||
mouseFollowerHorizontal->setVisible(true);
|
||||
mouseFollowerVertical->setVisible(true);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue