diff --git a/src/Gui/GuiApplication.cpp b/src/Gui/GuiApplication.cpp index 9a49556195..9b435015e3 100644 --- a/src/Gui/GuiApplication.cpp +++ b/src/Gui/GuiApplication.cpp @@ -316,6 +316,15 @@ bool WheelEventFilter::eventFilter(QObject* obj, QEvent* ev) { if (qobject_cast(obj) && ev->type() == QEvent::Wheel) return true; + QAbstractSpinBox* sb = qobject_cast(obj); + if (sb) { + if (ev->type() == QEvent::Show) { + sb->setFocusPolicy(Qt::StrongFocus); + } + else if (ev->type() == QEvent::Wheel) { + return !sb->hasFocus(); + } + } return false; }