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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 259db6a33..0ce5ef648 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -908,6 +908,7 @@ void MainWindow::setupForAddAndPlan(const char *model)
// setup the dive cylinders
DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->setupCylinders();
+
}
void MainWindow::on_actionReplanDive_triggered()
@@ -951,6 +952,8 @@ void MainWindow::on_actionDivePlanner_triggered()
setupForAddAndPlan("planned dive"); // don't translate, stored in XML file
DivePlannerPointsModel::instance()->setupStartTime();
DivePlannerPointsModel::instance()->createSimpleDive();
+ // plan the dive in the same mode as the currently selected one
+ divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
DivePictureModel::instance()->updateDivePictures();
divePlannerWidget()->setReplanButton(false);
}