summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-12-15 23:02:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-12-26 12:47:54 -0800
commitfb2ba72e429cd6c39b32eb87ee6c570149243ed5 (patch)
treed06d94b812825d2e29695911a925c56972e3520a /desktop-widgets/diveplanner.cpp
parente182581f773341daf70a3e40a7b876769d604271 (diff)
downloadsubsurface-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/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index b12feab95..ee85d12bc 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -181,6 +181,16 @@ void DivePlannerWidget::setupStartTime(QDateTime startTime)
ui.dateEdit->setDate(startTime.date());
}
+void DivePlannerWidget::setSurfacePressure(int surface_pressure)
+{
+ ui.ATMPressure->setValue(surface_pressure);
+}
+
+void DivePlannerWidget::setSalinity(int salinity)
+{
+ ui.salinity->setValue(salinity / 10000.0);
+}
+
void DivePlannerWidget::settingsChanged()
{
// Adopt units