From 8a4d3876d6ada94cb83f013f70a0e540ca0435f1 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Mon, 6 Mar 2017 21:46:05 +0100 Subject: Disable minimum gas calculation for recreational mode Signed-off-by: Stefan Fuchs --- desktop-widgets/diveplanner.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'desktop-widgets/diveplanner.cpp') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 804ea89e1..82b83c3ad 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -253,6 +253,14 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.vpmb_conservatism->setDisabled(true); ui.switch_at_req_stop->setDisabled(true); ui.min_switch_duration->setDisabled(true); + ui.sacfactor->setDisabled(true); + ui.problemsolvingtime->setDisabled(true); + ui.sacfactor->blockSignals(true); + ui.problemsolvingtime->blockSignals(true); + ui.sacfactor->setValue(2.0); + ui.problemsolvingtime->setValue(0); + ui.sacfactor->blockSignals(false); + ui.problemsolvingtime->blockSignals(false); } else if (mode == VPMB) { ui.gflow->setDisabled(true); @@ -265,6 +273,10 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.vpmb_conservatism->setDisabled(false); ui.switch_at_req_stop->setDisabled(false); ui.min_switch_duration->setDisabled(false); + ui.sacfactor->setDisabled(false); + ui.problemsolvingtime->setDisabled(false); + ui.sacfactor->setValue(prefs.sacfactor / 100.0); + ui.problemsolvingtime->setValue(prefs.problemsolvingtime); } else if (mode == BUEHLMANN) { ui.gflow->setDisabled(false); @@ -277,6 +289,10 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.vpmb_conservatism->setDisabled(true); ui.switch_at_req_stop->setDisabled(false); ui.min_switch_duration->setDisabled(false); + ui.sacfactor->setDisabled(false); + ui.problemsolvingtime->setDisabled(false); + ui.sacfactor->setValue(prefs.sacfactor / 100.0); + ui.problemsolvingtime->setValue(prefs.problemsolvingtime); } } -- cgit v1.2.3-70-g09d2