From bb3151795188fc5ef53053ce004dc1d1f2de63a1 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Wed, 6 Jul 2016 22:40:37 +1000 Subject: Planner: update cylinder mixes and MND and MOD when prefs are changed Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- desktop-widgets/diveplanner.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 31dd4bb93..4c740af07 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -21,6 +21,7 @@ #define UNIT_FACTOR ((prefs.units.length == units::METERS) ? 1000.0 / 60.0 : feet_to_mm(1.0) / 60.0) static DivePlannerPointsModel* plannerModel = DivePlannerPointsModel::instance(); +static CylindersModel* cylinderModel = CylindersModel::instance(); DiveHandler::DiveHandler() : QGraphicsEllipseItem() { @@ -354,8 +355,10 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.descRate, SIGNAL(valueChanged(int)), this, SLOT(setDescRate(int))); connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged())); connect(ui.bottompo2, SIGNAL(valueChanged(double)), this, SLOT(setBottomPo2(double))); + connect(ui.bottompo2, SIGNAL(valueChanged(double)), cylinderModel, SLOT(updateBestMixes())); connect(ui.decopo2, SIGNAL(valueChanged(double)), this, SLOT(setDecoPo2(double))); connect(ui.bestmixEND, SIGNAL(valueChanged(int)), this, SLOT(setBestmixEND(int))); + connect(ui.bestmixEND, SIGNAL(valueChanged(int)), cylinderModel, SLOT(updateBestMixes())); connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool))); connect(ui.bottomSAC, SIGNAL(valueChanged(double)), this, SLOT(bottomSacChanged(double))); connect(ui.decoStopSAC, SIGNAL(valueChanged(double)), this, SLOT(decoSacChanged(double))); -- cgit v1.2.3-70-g09d2