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 <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-10-21 16:39:35 +02:00 committed by Robert C. Helling
parent 16f330e6c9
commit d470ef05e0

View file

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