summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-23 13:17:18 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 08:40:08 -0800
commit53958a50c66c2f48b4791e61eb3288660ed81db7 (patch)
tree539b27a5db272189125d930ca13e5a0a53fd4c7d /desktop-widgets
parent5b9014aeb7d02d9db9677f81d20109ec67afa0c0 (diff)
downloadsubsurface-53958a50c66c2f48b4791e61eb3288660ed81db7.tar.gz
desktop-widgets: replace var plannerModel -> plannerShared converted
variables min_switch_duration are not set in diveplanner.cpp, but instead signals a slot in plannerModel. and are read from plannerShared which includes a conversion change signals to slots in plannerShared change read from prefs. to plannerShared Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index d31fc7ffb..dc6ae9a6e 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -455,7 +455,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.o2narcotic->setChecked(prefs.o2narcotic);
ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
ui.switch_at_req_stop->setChecked(prefs.switch_at_req_stop);
- ui.min_switch_duration->setValue(prefs.min_switch_duration / 60);
+ ui.min_switch_duration->setValue(plannerShared::min_switch_duration());
ui.surface_segment->setValue(prefs.surface_segment / 60);
ui.recreational_deco->setChecked(prefs.planner_deco_mode == RECREATIONAL);
ui.buehlmann_deco->setChecked(prefs.planner_deco_mode == BUEHLMANN);
@@ -500,7 +500,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.bailout, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_bailout(bool)));
connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool)));
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_switch_at_req_stop(bool)));
- connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
+ connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerShared::instance(), SLOT(set_min_switch_duration()(int)));
connect(ui.surface_segment, SIGNAL(valueChanged(int)), plannerModel, SLOT(setSurfaceSegment(int)));
connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), plannerModel, SLOT(setRebreatherMode(int)));
connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), this, SLOT(setBailoutVisibility(int)));