Gui: do not drop unhandled key events in *SpinBox::keyPressedEvent() handlers

This commit is contained in:
Thomas Gimpel
2020-07-11 20:01:46 +02:00
committed by wwmayer
parent 85846b7e58
commit 0ba7dcd0f6
2 changed files with 7 additions and 13 deletions

View File

@@ -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"