From 835affacd25659fa0ff14ff32a0dc91565310f35 Mon Sep 17 00:00:00 2001 From: tlarok <116431383+tlarok@users.noreply.github.com> Date: Wed, 2 Apr 2025 19:52:03 +0200 Subject: [PATCH] Update kbm_gui.cpp --- src/qt_gui/kbm_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qt_gui/kbm_gui.cpp b/src/qt_gui/kbm_gui.cpp index 59cacc19a..4db7806f0 100644 --- a/src/qt_gui/kbm_gui.cpp +++ b/src/qt_gui/kbm_gui.cpp @@ -699,6 +699,7 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) { if (event->type() == QEvent::KeyPress) { QKeyEvent* keyEvent = static_cast(event); QString keyText; + if (timer && timer->isActive()) { timer->stop(); } @@ -1008,7 +1009,6 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) { if (timer && timer->isActive()) { timer->stop(); } - switch (mouseEvent->button()) { case Qt::LeftButton: buttonText = "leftbutton"; @@ -1025,6 +1025,7 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) { if (!buttonText.isEmpty() && !mappinglist.contains(buttonText)) { SetMapping(buttonText); // Add the key to the mapping list } + return true; } @@ -1088,6 +1089,7 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) { if (!WheelText.isEmpty() && !mappinglist.contains(WheelText)) { SetMapping(WheelText); } + EnableMapping = false; EnableMappingButtons(); timer->stop();