mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Fix bug where a disabled ToggleButton could be toggled using screen readers
This commit is contained in:
parent
fd1c29e56b
commit
07f801143c
1 changed files with 1 additions and 1 deletions
|
|
@ -171,7 +171,7 @@ void Button::setToggleState (bool shouldBeOn, NotificationType notification)
|
||||||
|
|
||||||
void Button::setToggleState (bool shouldBeOn, NotificationType clickNotification, NotificationType stateNotification)
|
void Button::setToggleState (bool shouldBeOn, NotificationType clickNotification, NotificationType stateNotification)
|
||||||
{
|
{
|
||||||
if (shouldBeOn != lastToggleState)
|
if (isEnabled() && shouldBeOn != lastToggleState)
|
||||||
{
|
{
|
||||||
WeakReference<Component> deletionWatcher (this);
|
WeakReference<Component> deletionWatcher (this);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue