diff options
author | Robert C. Helling <helling@atdotde.de> | 2016-12-15 23:02:32 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-12-26 12:47:54 -0800 |
commit | fb2ba72e429cd6c39b32eb87ee6c570149243ed5 (patch) | |
tree | d06d94b812825d2e29695911a925c56972e3520a /desktop-widgets/mainwindow.cpp | |
parent | e182581f773341daf70a3e40a7b876769d604271 (diff) | |
download | subsurface-fb2ba72e429cd6c39b32eb87ee6c570149243ed5.tar.gz |
Set surface pressure and salinity correctly when replanning
We need to initialize the UI elements accordingly.
Fixes #1094
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-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 2143663e8..5231961c7 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -914,6 +914,8 @@ void MainWindow::on_actionReplanDive_triggered() setApplicationState("PlanDive"); divePlannerWidget()->setReplanButton(true); divePlannerWidget()->setupStartTime(QDateTime::fromMSecsSinceEpoch(1000 * current_dive->when, Qt::UTC)); + divePlannerWidget()->setSurfacePressure(current_dive->surface_pressure.mbar); + divePlannerWidget()->setSalinity(current_dive->salinity); DivePlannerPointsModel::instance()->loadFromDive(current_dive); reset_cylinders(&displayed_dive, true); } |