From d470ef05e026adf6bf73753774f5be92b96f1ec7 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Sat, 21 Oct 2017 16:39:35 +0200 Subject: [PATCH] New dive plan set salinity to current dive salinity if dive selected This helps people who always use a std. salinity of e.g. 1020g/l. If they have a log with their dives open and plan a new dive they will have also for new planned dives the salinity set to their prefered value. Signed-off-by: Stefan Fuchs --- desktop-widgets/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 9098d868a..95495b663 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -972,6 +972,8 @@ void MainWindow::on_actionDivePlanner_triggered() if (current_dive) divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode); DivePictureModel::instance()->updateDivePictures(); + if (current_dive->salinity) + divePlannerWidget()->setSalinity(current_dive->salinity); divePlannerWidget()->setReplanButton(false); }