Sketcher: Make TAB clear the field if user hasn't valid input
This commit is contained in:
committed by
Benjamin Nauck
parent
7515c70b67
commit
75017b2dd2
@@ -221,6 +221,10 @@ bool EditableDatumLabel::eventFilter(QObject* watched, QEvent* event)
|
||||
// if tab has been pressed and user did not type anything previously,
|
||||
// then just cycle but don't lock anything, otherwise we lock the label
|
||||
if (keyEvent->key() == Qt::Key_Tab && !this->isSet) {
|
||||
if (!this->spinBox->hasValidInput()) {
|
||||
Q_EMIT this->spinBox->valueChanged(this->value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user