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:
Berthold Stoeger 2020-11-25 07:40:09 +01:00 committed by Dirk Hohndel
parent bb76cb56d4
commit 674c20227b
3 changed files with 4 additions and 2 deletions

View file

@ -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));