summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-10 22:51:28 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-25 17:13:20 -0800
commitff360d28f5a8f95a0a8186ca601f8eb38c1192bf (patch)
tree2e5ee36952cef1d640d812d5ed3f2cf9b099b74a /desktop-widgets
parent995340b68a71c70e5de3c421ddfe69e81cacaf36 (diff)
downloadsubsurface-ff360d28f5a8f95a0a8186ca601f8eb38c1192bf.tar.gz
diveplanner: add surface_segment to plannershared
Add surface_segment to plannerShared and then update desktop-widgets. Signed-off-by: jan Iversen <jan@casacondor.com> desktop-widgets: use plannerShared for surface_segment Change getter/setter for surface_segment to plannerShared, in order to share the conversion with mobile diveplanner Signed-off-by: jan Iversen <jan@casacondor.com>
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 f236ec205..70aaa22e0 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -443,7 +443,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
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(plannerShared::min_switch_duration());
- ui.surface_segment->setValue(prefs.surface_segment / 60);
+ ui.surface_segment->setValue(plannerShared::surface_segment());
ui.recreational_deco->setChecked(prefs.planner_deco_mode == RECREATIONAL);
ui.buehlmann_deco->setChecked(prefs.planner_deco_mode == BUEHLMANN);
ui.vpmb_deco->setChecked(prefs.planner_deco_mode == VPMB);
@@ -481,7 +481,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.o2narcotic, &QAbstractButton::toggled, plannerShared::instance(), &plannerShared::set_o2narcotic);
connect(ui.switch_at_req_stop, &QAbstractButton::toggled, plannerModel, &DivePlannerPointsModel::setSwitchAtReqStop);
connect(ui.min_switch_duration, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_min_switch_duration);
- connect(ui.surface_segment, QOverload<int>::of(&QSpinBox::valueChanged), plannerModel, &DivePlannerPointsModel::setSurfaceSegment);
+ connect(ui.surface_segment, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), plannerShared::set_surface_segment);
connect(ui.rebreathermode, QOverload<int>::of(&QComboBox::currentIndexChanged), plannerModel, &DivePlannerPointsModel::setRebreatherMode);
connect(ui.rebreathermode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlannerSettingsWidget::setBailoutVisibility);