Gui: Ensure that QuantitySpiBox handles expression properly
This commit is contained in:
committed by
Chris Hennes
parent
60bd277d7a
commit
febfd65e59
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user