Utils: Fix IntegerAspect::addToLayout

The UI should show the volatileValue, not the value().

Change-Id: Ia4b4e596e757cfb3590d6df2f359f6a90f7c5790
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-03-11 11:43:43 +01:00
parent a7bf5f17c5
commit 1942506b2c

View File

@@ -2354,7 +2354,7 @@ void IntegerAspect::addToLayout(Layouting::LayoutItem &parent)
if (d->m_maximumValue && d->m_maximumValue)
d->m_spinBox->setRange(int(d->m_minimumValue.value() / d->m_displayScaleFactor),
int(d->m_maximumValue.value() / d->m_displayScaleFactor));
d->m_spinBox->setValue(int(value() / d->m_displayScaleFactor)); // Must happen after setRange()
bufferToGui();
addLabeledItem(parent, d->m_spinBox);
connect(d->m_spinBox.data(), &QSpinBox::valueChanged,
this, &IntegerAspect::handleGuiChanged);