From 9a54f3a01a582ca2e19ab055355db640be93b2e1 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 22 Jan 2014 09:39:25 +0000 Subject: [PATCH] Stopped buttons responding to key-shortcuts when they're not actually visible. --- modules/juce_gui_basics/buttons/juce_Button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index ac93013b6c..be7e55c5a2 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -572,7 +572,7 @@ void Button::clearShortcuts() bool Button::isShortcutPressed() const { - if (! isCurrentlyBlockedByAnotherModalComponent()) + if (isShowing() && ! isCurrentlyBlockedByAnotherModalComponent()) for (int i = shortcuts.size(); --i >= 0;) if (shortcuts.getReference(i).isCurrentlyDown()) return true;