summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index fd14944f0..f84781e96 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -306,7 +306,6 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.display_runtime->setChecked(prefs.display_runtime);
ui.display_transitions->setChecked(prefs.display_transitions);
ui.safetystop->setChecked(prefs.safetystop);
- ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
ui.backgasBreaks->setChecked(prefs.doo2breaks);
@@ -448,6 +447,18 @@ void PlannerSettingsWidget::settingsChanged()
ui.bottomSAC->setValue((double) prefs.bottomsac / 1000.0);
ui.decoStopSAC->setValue((double) prefs.decosac / 1000.0);
}
+ if(get_units()->pressure == units::BAR) {
+ ui.reserve_gas->setSuffix(tr("bar"));
+ ui.reserve_gas->setSingleStep(1);
+ ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
+ ui.reserve_gas->setMaximum(300);
+ } else {
+ ui.reserve_gas->setSuffix(tr("psi"));
+ ui.reserve_gas->setSingleStep(10);
+ ui.reserve_gas->setMaximum(5000);
+ ui.reserve_gas->setValue(mbar_to_PSI(prefs.reserve_gas));
+ }
+
ui.bottomSAC->blockSignals(false);
ui.decoStopSAC->blockSignals(false);
updateUnitsUI();
@@ -458,10 +469,6 @@ void PlannerSettingsWidget::settingsChanged()
ui.descRate->setSuffix(vs);
}
-void PlannerSettingsWidget::atmPressureChanged(const QString &pressure)
-{
-}
-
void PlannerSettingsWidget::printDecoPlan()
{
}