Commit 1f676cf8 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch '64-hotfix-widgets-won-t-change-dtk-parameter-on-manual-editing' into 'develop'

Resolve "[HOTFIX] Widgets won't change dtk parameter on manual editing"

Closes #64

See merge request !66
parents 8006e89f 87ed984e
Pipeline #140352 passed with stage
in 0 seconds
......@@ -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