summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2016-09-24 18:02:08 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-09-24 08:30:11 -0700
commit7e09a6c7bcb135d65b3e48f2aee44791dd080443 (patch)
treed1a3620e9084cf335f711fdf0b4ca397914117a3 /desktop-widgets/diveplanner.cpp
parent7b891904e77364719471098a7bdf4eacc589807c (diff)
downloadsubsurface-7e09a6c7bcb135d65b3e48f2aee44791dd080443.tar.gz
Separate VPM-B conservatism preference for planner and profile
Separate the VPM-B conservatism preference into diveplan.vpmb_conservatism for planning dives and prefs.vpmb_conservatism for profile ceiling display of saved dives. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index ed6515e19..cb357482f 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -237,7 +237,7 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.bottompo2->setDisabled(true);
ui.decopo2->setDisabled(true);
ui.reserve_gas->setDisabled(false);
- ui.conservatism_lvl->setDisabled(true);
+ ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(true);
ui.min_switch_duration->setDisabled(true);
}
@@ -249,7 +249,7 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.bottompo2->setDisabled(false);
ui.decopo2->setDisabled(false);
ui.reserve_gas->setDisabled(true);
- ui.conservatism_lvl->setDisabled(false);
+ ui.vpmb_conservatism->setDisabled(false);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);
}
@@ -261,7 +261,7 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.bottompo2->setDisabled(false);
ui.decopo2->setDisabled(false);
ui.reserve_gas->setDisabled(true);
- ui.conservatism_lvl->setDisabled(true);
+ ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);
}
@@ -296,7 +296,6 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.recreational_deco->setChecked(prefs.deco_mode == RECREATIONAL);
ui.buehlmann_deco->setChecked(prefs.deco_mode == BUEHLMANN);
ui.vpmb_deco->setChecked(prefs.deco_mode == VPMB);
- ui.conservatism_lvl->setValue(prefs.vpmb_conservatism);
disableDecoElements((int) prefs.deco_mode);
// should be the same order as in dive_comp_type!
@@ -330,7 +329,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
connect(ui.gfhigh, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFHigh()));
connect(ui.gflow, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFLow()));
- connect(ui.conservatism_lvl, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
+ connect(ui.vpmb_conservatism, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
@@ -354,6 +353,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
settingsChanged();
ui.gflow->setValue(prefs.gflow);
ui.gfhigh->setValue(prefs.gfhigh);
+ ui.vpmb_conservatism->setValue(prefs.vpmb_conservatism);
setMinimumWidth(0);
setMinimumHeight(0);