diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-10-26 13:10:35 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-10-27 20:36:02 -0700 |
commit | 46f3b0f238b4c880af974b3fb5bfd2829db215a8 (patch) | |
tree | 70f87b73c0f27093055348cf5d052e5b2049e44f /desktop-widgets | |
parent | f2bbd0c62737fabea58d1454df1aea036f6e774b (diff) | |
download | subsurface-46f3b0f238b4c880af974b3fb5bfd2829db215a8.tar.gz |
Planner: connect emitDataChanged slot to ascent/descent rate editingFinished
Call the emitDataChanged slot when ascent and descent rate spinboxes lose
focus. Without this connection, rates are not updated immediately after
editing the value with keyboard numbers and hitting tab or enter.
It is necessary to keep the valueChanged(int) connections, because
editingFinished() is not triggered by changing the value with the arrows.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/diveplanner.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index cb357482f..b12feab95 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -324,6 +324,11 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.ascRateStops, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged())); connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged())); connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged())); + connect(ui.ascRate75, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged())); + connect(ui.ascRate50, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged())); + connect(ui.ascRateStops, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged())); + connect(ui.ascRateLast6m, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged())); + connect(ui.descRate, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged())); connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool))); connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int))); connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int))); |