aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index bcd8f8e6e..df0a43b1b 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -979,11 +979,12 @@ void MainWindow::on_actionDivePlanner_triggered()
DivePlannerPointsModel::instance()->setupStartTime();
DivePlannerPointsModel::instance()->createSimpleDive();
// plan the dive in the same mode as the currently selected one
- if (current_dive)
+ if (current_dive) {
divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
+ if (current_dive->salinity)
+ divePlannerWidget()->setSalinity(current_dive->salinity);
+ }
DivePictureModel::instance()->updateDivePictures();
- if (current_dive->salinity)
- divePlannerWidget()->setSalinity(current_dive->salinity);
divePlannerWidget()->setReplanButton(false);
}