Commit 2e8ad287 authored by Marc R.'s avatar Marc R.

Merge branch 'fix-ddouble-property-segfault-when-changing-suffix' into 'master'

Resolve "DDouble causing Segfault when changing suffix or prefix after changing the value via editor"

Closes #226

See merge request !207
parents 0cf7463f 0bc50d79
......@@ -226,6 +226,9 @@ QWidget *QtDecoratedDoubleSpinBoxFactory::createEditor(QtDecoratedDoubleProperty
createdEditors[property].append(spinBox);
editorToProperty[spinBox] = property;
connect(spinBox, SIGNAL(destroyed(QObject *)),
this, SLOT(slotEditorDestroyed(QObject *)));
return spinBox;
}
......@@ -251,7 +254,9 @@ void QtDecoratedDoubleSpinBoxFactory::slotPrefixChanged(QtProperty *property, co
QListIterator<QDoubleSpinBox *> itEditor(editors);
while (itEditor.hasNext()) {
QDoubleSpinBox *editor = itEditor.next();
editor->blockSignals(true);
editor->setPrefix(prefix);
editor->blockSignals(false);
}
}
......@@ -269,7 +274,9 @@ void QtDecoratedDoubleSpinBoxFactory::slotSuffixChanged(QtProperty *property, co
QListIterator<QDoubleSpinBox *> itEditor(editors);
while (itEditor.hasNext()) {
QDoubleSpinBox *editor = itEditor.next();
editor->blockSignals(true);
editor->setSuffix(prefix);
editor->blockSignals(false);
}
}
......
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