Gui: Ensure that QuantitySpiBox handles expression properly
This commit is contained in:
committed by
Chris Hennes
parent
df93d3b61d
commit
1918d2b22c
@@ -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