diff options
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 684ef44aa..f6f6c3894 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -219,11 +219,31 @@ void PlannerSettingsWidget::decoSacChanged(const double decosac) void PlannerSettingsWidget::disableDecoElements(bool value) { - ui.lastStop->setDisabled(value); - ui.backgasBreaks->setDisabled(value); - ui.bottompo2->setDisabled(value); - ui.decopo2->setDisabled(value); - ui.reserve_gas->setDisabled(!value); + if (prefs.deco_mode == RECREATIONAL) { + ui.lastStop->setDisabled(value); + ui.backgasBreaks->setDisabled(value); + ui.bottompo2->setDisabled(value); + ui.decopo2->setDisabled(value); + ui.reserve_gas->setDisabled(!value); + } + else if (prefs.deco_mode == VPMB) { + ui.gflow->setDisabled(value); + ui.gfhigh->setDisabled(value); + ui.lastStop->setDisabled(!value); + ui.backgasBreaks->setDisabled(!value); + ui.bottompo2->setDisabled(!value); + ui.decopo2->setDisabled(!value); + ui.reserve_gas->setDisabled(value); + } + else if (prefs.deco_mode == BUEHLMANN) { + ui.gflow->setDisabled(!value); + ui.gfhigh->setDisabled(!value); + ui.lastStop->setDisabled(!value); + ui.backgasBreaks->setDisabled(!value); + ui.bottompo2->setDisabled(!value); + ui.decopo2->setDisabled(!value); + ui.reserve_gas->setDisabled(value); + } } void DivePlannerWidget::printDecoPlan() |