diff options
author | Robert C. Helling <helling@atdotde.de> | 2020-09-02 11:10:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-09-02 09:43:38 -0700 |
commit | 7e82205e9b7b14e960dc1e83fcf6ef927e746fba (patch) | |
tree | b1d4f93f34a966e2aa619ed0de23d5bd3c0caaac /desktop-widgets | |
parent | f5ba42e933ae4701f40ba8b8b8058e5dd8c82cc0 (diff) | |
download | subsurface-7e82205e9b7b14e960dc1e83fcf6ef927e746fba.tar.gz |
Planner: Properly initialize salinity
When the dive has no explicity salinity, our conversion
between pressure and depth assumed salt water. Make this
explicity by using the corresponding macro.
When the planner starts and no salinity is set explicity,
set the water type chooser to salt water to reflect
our default assumption.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 87a7e1d06..5c151849f 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -895,6 +895,8 @@ void MainWindow::on_actionDivePlanner_triggered() divePlannerSettingsWidget->setBailoutVisibility(current_dive->dc.divemode); if (current_dive->salinity) divePlannerWidget->setSalinity(current_dive->salinity); + else // No salinity means salt water + divePlannerWidget->setSalinity(SEAWATER_SALINITY); } divePlannerWidget->setReplanButton(false); } |