summaryrefslogtreecommitdiff
path: root/src/gui/windows/quitdialog.cpp
diff options
context:
space:
mode:
authorewewukek <ewewukek@gmail.com>2024-04-02 08:18:17 +0300
committerFedja Beader <fedja@protonmail.ch>2024-05-15 00:11:38 +0200
commit16fafb1516a346ee0553a329b0606c2bb55283d7 (patch)
tree653360810d5c394e3457a4c6f8a236e69fa2618b /src/gui/windows/quitdialog.cpp
parent4c6d99ef4e393f900c4acf521a376f6ea0e012f6 (diff)
downloadplus-16fafb1516a346ee0553a329b0606c2bb55283d7.tar.gz
plus-16fafb1516a346ee0553a329b0606c2bb55283d7.tar.bz2
plus-16fafb1516a346ee0553a329b0606c2bb55283d7.tar.xz
plus-16fafb1516a346ee0553a329b0606c2bb55283d7.zip
Consume input event in QuitDialog instead of relying on a hack
Diffstat (limited to 'src/gui/windows/quitdialog.cpp')
-rw-r--r--src/gui/windows/quitdialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index d1ceb1ad9..7ef2bc6e8 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -210,6 +210,7 @@ void QuitDialog::keyPressed(KeyEvent &event)
{
const InputActionT actionId = event.getActionId();
int dir = 0;
+ bool consume = true;
PRAGMA45(GCC diagnostic push)
PRAGMA45(GCC diagnostic ignored "-Wswitch-enum")
@@ -229,10 +230,14 @@ void QuitDialog::keyPressed(KeyEvent &event)
dir = 1;
break;
default:
+ consume = false;
break;
}
PRAGMA45(GCC diagnostic pop)
+ if (consume)
+ event.consume();
+
if (dir != 0)
{
STD_VECTOR<RadioButton*>::const_iterator it = mOptions.begin();