1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Stopped buttons responding to key-shortcuts when they're not actually visible.

This commit is contained in:
jules 2014-01-22 09:39:25 +00:00
parent d2532f4540
commit 9a54f3a01a

View file

@ -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;