forked from qt-creator/qt-creator
Utils: Use handleGuiChanged more consistently in aspect implementations
Change-Id: I53eb3416b27dca45bd30860f1fb0ec674c98240e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1860,11 +1860,8 @@ void IntegerAspect::addToLayout(Layouting::LayoutItem &parent)
|
||||
int(d->m_maximumValue.value() / d->m_displayScaleFactor));
|
||||
d->m_spinBox->setValue(int(value() / d->m_displayScaleFactor)); // Must happen after setRange()
|
||||
addLabeledItem(parent, d->m_spinBox);
|
||||
|
||||
if (isAutoApply()) {
|
||||
connect(d->m_spinBox.data(), &QSpinBox::valueChanged,
|
||||
this, [this] { setValue(d->m_spinBox->value() * d->m_displayScaleFactor); });
|
||||
}
|
||||
this, &IntegerAspect::handleGuiChanged);
|
||||
}
|
||||
|
||||
void IntegerAspect::guiToBuffer()
|
||||
@@ -1962,11 +1959,8 @@ void DoubleAspect::addToLayout(LayoutItem &builder)
|
||||
d->m_spinBox->setRange(d->m_minimumValue.value(), d->m_maximumValue.value());
|
||||
bufferToGui(); // Must happen after setRange()!
|
||||
addLabeledItem(builder, d->m_spinBox);
|
||||
|
||||
if (isAutoApply()) {
|
||||
connect(d->m_spinBox.data(), &QDoubleSpinBox::valueChanged,
|
||||
this, [this] { setValue(d->m_spinBox->value()); });
|
||||
}
|
||||
this, &DoubleAspect::handleGuiChanged);
|
||||
}
|
||||
|
||||
void DoubleAspect::guiToBuffer()
|
||||
|
||||
Reference in New Issue
Block a user