From d1ed072622a984bbcdd099dec986b2f50c508a66 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 30 Apr 2018 09:15:38 +0100 Subject: [PATCH] Ensure that pressing the escape key always dismisses an AlertWindow --- modules/juce_gui_basics/windows/juce_AlertWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp index 0cf30ff117..c55c7aa8f8 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp @@ -523,7 +523,7 @@ bool AlertWindow::keyPressed (const KeyPress& key) } } - if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels && buttons.size() == 0) + if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels) { exitModalState (0); return true;