Gui: Ensure that QuantitySpiBox handles expression properly

This commit is contained in:
Kacper Donat
2025-12-21 19:17:01 +01:00
committed by Chris Hennes
parent 60bd277d7a
commit febfd65e59

View File

@@ -453,6 +453,9 @@ void Gui::QuantitySpinBox::keyPressEvent(QKeyEvent* event)
const auto isEnter = event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return;
if (d->normalize && isEnter && !isNormalized()) {
// ensure that input is up to date
handlePendingEmit();
normalize();
return;
}