From 030c094854aeab4aaade523d7126728d9ce98a5b Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sat, 7 Oct 2017 12:50:10 +0200 Subject: [PATCH] Remove disfunctional asc. rate signals and add disable keyboardTracking The connection wasn't working anyway since the signal comes without value while the slot wanted a value and thus only created a runtime warning. Turning of keyboard tracking means that when typing the number 123 the value change signal is not fired three times (with values 1, 12, and 123) but is only fired upon pressing enter or the spin box losing focus. We should add a similar setting to the depth, duration and runtime columns of the DivePlannerPointsModel but i have no clue how to do that. Signed-off-by: Robert C. Helling --- desktop-widgets/diveplanner.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 0660b6631..f62609877 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -364,11 +364,6 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.ascRateStops, SIGNAL(valueChanged(int)), plannerModel, SLOT(setAscratestops(int))); connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), plannerModel, SLOT(setAscratelast6m(int))); connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(setDescrate(int))); - connect(ui.ascRate75, SIGNAL(editingFinished()), plannerModel, SLOT(setAscrate75(int))); - connect(ui.ascRate50, SIGNAL(editingFinished()), plannerModel, SLOT(setAscrate50(int))); - connect(ui.ascRateStops, SIGNAL(editingFinished()), plannerModel, SLOT(setAscratestops(int))); - connect(ui.ascRateLast6m, SIGNAL(editingFinished()), plannerModel, SLOT(setAscratelast6m(int))); - connect(ui.descRate, SIGNAL(editingFinished()), plannerModel, SLOT(setDescrate(int))); 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))); @@ -402,6 +397,14 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) ui.gfhigh->setValue(prefs.gfhigh); ui.vpmb_conservatism->setValue(prefs.vpmb_conservatism); + ui.ascRate75->setKeyboardTracking(false); + ui.ascRate50->setKeyboardTracking(false); + ui.ascRateLast6m->setKeyboardTracking(false); + ui.ascRateStops->setKeyboardTracking(false); + ui.descRate->setKeyboardTracking(false); + ui.gfhigh->setKeyboardTracking(false); + ui.gflow->setKeyboardTracking(false); + setMinimumWidth(0); setMinimumHeight(0); }