diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 5708d4d0dd..35fcd8aece 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -513,7 +513,7 @@ void Gui::QuantitySpinBox::keyPressEvent(QKeyEvent *event) { if (event->text() == QString::fromUtf8("=") && isBound()) openFormulaDialog(); - else if (!hasExpression()) + else QAbstractSpinBox::keyPressEvent(event); } diff --git a/src/Gui/SpinBox.cpp b/src/Gui/SpinBox.cpp index c0d6114c29..b5a5d2731d 100644 --- a/src/Gui/SpinBox.cpp +++ b/src/Gui/SpinBox.cpp @@ -405,10 +405,8 @@ void UIntSpinBox::keyPressEvent(QKeyEvent *event) { if (event->text() == QString::fromUtf8("=") && isBound()) openFormulaDialog(); - else { - if (!hasExpression()) - QAbstractSpinBox::keyPressEvent(event); - } + else + QAbstractSpinBox::keyPressEvent(event); } @@ -584,10 +582,8 @@ void IntSpinBox::keyPressEvent(QKeyEvent *event) { if (event->text() == QString::fromUtf8("=") && isBound()) openFormulaDialog(); - else { - if (!hasExpression()) - QAbstractSpinBox::keyPressEvent(event); - } + else + QAbstractSpinBox::keyPressEvent(event); } @@ -762,10 +758,8 @@ void DoubleSpinBox::keyPressEvent(QKeyEvent *event) { if (event->text() == QString::fromUtf8("=") && isBound()) openFormulaDialog(); - else { - if (!hasExpression()) - QAbstractSpinBox::keyPressEvent(event); - } + else + QAbstractSpinBox::keyPressEvent(event); } #include "moc_SpinBox.cpp"