Commit cf940140 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch 'develop' into feature/get-parameter-widgets

parents 7cb44e85 aad0103b
# ChangeLog
## version 2.22.2 - 2020-04-27
- hotfix widgets won't change dtk parameter on manual editing
## version 2.22.1 - 2020-04-24
- hotfix the dtk-core version for conda recipe at run time
## version 2.22.0 - 2020-04-23
......
......@@ -24,7 +24,7 @@ project(dtkWidgets)
set(${PROJECT_NAME}_VERSION_MAJOR 2)
set(${PROJECT_NAME}_VERSION_MINOR 22)
set(${PROJECT_NAME}_VERSION_PATCH 1)
set(${PROJECT_NAME}_VERSION_PATCH 2)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
......
......@@ -50,9 +50,11 @@ public:
void dtkWidgetsSpinBoxDoublePrivate::update(void)
{
double new_value = valueFromText( q->text());
if(new_value != this->value) {
this->value = new_value;
double old_value = this->value;
this->valueFromText(q->text());
if(old_value != this->value) {
this->touch();
}
}
......@@ -148,13 +150,10 @@ QValidator::State dtkWidgetsSpinBoxDoublePrivate::validate(QString &text, int &p
//
// ///////////////////////////////////////////////////////////////////
dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation notation, QWidget *parent)
dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation notation, QWidget *parent)
: dtkWidgetsBaseSpinBox(parent), d(new dtkWidgetsSpinBoxDoublePrivate)
{
d->q = this;
d->value = 0.0;
......@@ -172,11 +171,8 @@ dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation nota
this->lineEdit()->setValidator(d->validator);
connect(this,
SIGNAL(editingFinished()),
d,
SLOT(update()));
QObject::connect(this, &dtkWidgetsBaseSpinBox::editingFinished,
d, &dtkWidgetsSpinBoxDoublePrivate::update);
}
dtkWidgetsSpinBoxDouble::~dtkWidgetsSpinBoxDouble(void)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment