mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibGUI: Only react on KeyDown when escaping a Dialog
Both KeyEvents aren't necessary and erroneously close two Dialogs at once.
This commit is contained in:
parent
463aff827e
commit
51006930da
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ void Dialog::done(ExecResult result)
|
|||
|
||||
void Dialog::event(Core::Event& event)
|
||||
{
|
||||
if (event.type() == Event::KeyUp || event.type() == Event::KeyDown) {
|
||||
if (event.type() == Event::KeyDown) {
|
||||
auto& key_event = static_cast<KeyEvent&>(event);
|
||||
if (key_event.key() == KeyCode::Key_Escape) {
|
||||
done(ExecResult::Cancel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue