From 57032e9fcb3f892ffc64e4985ed27bd50a40bf20 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Thu, 2 Nov 2017 20:39:58 +0100 Subject: In planner for different deco modes enable/disable options correctly Disable option "safety stop" for all deco modes other than "recreational". Disable also labels "reserve gas", "GF ..." and "VPM conservatism" correctly. Signed-off-by: Stefan Fuchs --- desktop-widgets/diveplanner.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'desktop-widgets/diveplanner.cpp') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 2f3fd49c5..38d41d59a 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -250,13 +250,18 @@ void PlannerSettingsWidget::decoSacChanged(const double decosac) void PlannerSettingsWidget::disableDecoElements(int mode) { if (mode == RECREATIONAL) { + ui.label_gflow->setDisabled(false); + ui.label_gfhigh->setDisabled(false); ui.gflow->setDisabled(false); ui.gfhigh->setDisabled(false); ui.lastStop->setDisabled(true); ui.backgasBreaks->setDisabled(true); ui.bottompo2->setDisabled(false); ui.decopo2->setDisabled(true); + ui.safetystop->setDisabled(false); + ui.label_reserve_gas->setDisabled(false); ui.reserve_gas->setDisabled(false); + ui.label_vpmb_conservatism->setDisabled(true); ui.vpmb_conservatism->setDisabled(true); ui.switch_at_req_stop->setDisabled(true); ui.min_switch_duration->setDisabled(true); @@ -270,13 +275,18 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.problemsolvingtime->blockSignals(false); } else if (mode == VPMB) { + ui.label_gflow->setDisabled(true); + ui.label_gfhigh->setDisabled(true); ui.gflow->setDisabled(true); ui.gfhigh->setDisabled(true); ui.lastStop->setDisabled(false); ui.backgasBreaks->setDisabled(false); ui.bottompo2->setDisabled(false); ui.decopo2->setDisabled(false); + ui.safetystop->setDisabled(true); + ui.label_reserve_gas->setDisabled(true); ui.reserve_gas->setDisabled(true); + ui.label_vpmb_conservatism->setDisabled(false); ui.vpmb_conservatism->setDisabled(false); ui.switch_at_req_stop->setDisabled(false); ui.min_switch_duration->setDisabled(false); @@ -286,13 +296,18 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.problemsolvingtime->setValue(prefs.problemsolvingtime); } else if (mode == BUEHLMANN) { + ui.label_gflow->setDisabled(false); + ui.label_gfhigh->setDisabled(false); ui.gflow->setDisabled(false); ui.gfhigh->setDisabled(false); ui.lastStop->setDisabled(false); ui.backgasBreaks->setDisabled(false); ui.bottompo2->setDisabled(false); ui.decopo2->setDisabled(false); + ui.safetystop->setDisabled(true); + ui.label_reserve_gas->setDisabled(true); ui.reserve_gas->setDisabled(true); + ui.label_vpmb_conservatism->setDisabled(true); ui.vpmb_conservatism->setDisabled(true); ui.switch_at_req_stop->setDisabled(false); ui.min_switch_duration->setDisabled(false); -- cgit v1.2.3-70-g09d2