aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/diveplanner.cpp4
-rw-r--r--desktop-widgets/mainwindow.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index e237097c5..527e0021a 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -540,8 +540,6 @@ PlannerWidgets::PlannerWidgets()
void PlannerWidgets::planDive()
{
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
-
- MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0);
dc_number = 0;
// create a simple starting dive, using the first gas from the just copied cylinders
@@ -569,8 +567,6 @@ void PlannerWidgets::replanDive()
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive);
- MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0);
-
plannerWidget.setReplanButton(true);
plannerWidget.setupStartTime(timestampToDateTime(displayed_dive.when));
if (displayed_dive.surface_pressure.mbar)
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index b6cae1e96..92a2c11a0 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -771,6 +771,7 @@ void MainWindow::on_actionReplanDive_triggered()
// put us in PLAN mode
setApplicationState(ApplicationState::PlanDive);
+ graphics->setPlanState(&displayed_dive, 0);
plannerWidgets->replanDive();
}
@@ -782,6 +783,7 @@ void MainWindow::on_actionDivePlanner_triggered()
// put us in PLAN mode
setApplicationState(ApplicationState::PlanDive);
+ graphics->setPlanState(&displayed_dive, 0);
plannerWidgets->planDive();
}