From 75017b2dd25c9c66c03e7e898684c58f57e59a53 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Mon, 23 Jun 2025 19:24:30 +0200 Subject: [PATCH] Sketcher: Make TAB clear the field if user hasn't valid input --- src/Gui/EditableDatumLabel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/EditableDatumLabel.cpp b/src/Gui/EditableDatumLabel.cpp index a0fc8f91bc..d0d36d1182 100644 --- a/src/Gui/EditableDatumLabel.cpp +++ b/src/Gui/EditableDatumLabel.cpp @@ -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; }