diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2015-07-07 20:29:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-07 11:49:16 -0700 |
commit | 68ceb75294348953baa8827fbe3f5778980efbec (patch) | |
tree | 1b78dc422c890fa0f43f58730c513fcb6c1661ac /qt-ui/diveplanner.cpp | |
parent | 19648e28cc9463ecad831ef28a736466bd87428f (diff) | |
download | subsurface-68ceb75294348953baa8827fbe3f5778980efbec.tar.gz |
Planner: disable unrelated planner settings
When VPM-B is the choosen deco algorithm changing,
GF low and high have no effect. So lets disable them similar to what we do
for recreational mode.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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() |