mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Fix for auto-toggle DrawableButtons not updating their image immediately.
This commit is contained in:
parent
a7df25f860
commit
2cded82ea6
2 changed files with 4 additions and 3 deletions
|
|
@ -308,7 +308,7 @@ void Button::triggerClick()
|
|||
void Button::internalClickCallback (const ModifierKeys& modifiers)
|
||||
{
|
||||
if (clickTogglesState)
|
||||
setToggleState ((radioGroupId != 0) || ! lastToggleState, dontSendNotification);
|
||||
setToggleState (radioGroupId != 0 || ! lastToggleState, sendNotification);
|
||||
|
||||
sendClickMessage (modifiers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ Drawable* DrawableButton::getOverImage() const noexcept
|
|||
|
||||
Drawable* DrawableButton::getDownImage() const noexcept
|
||||
{
|
||||
Drawable* const d = getToggleState() ? downImageOn : downImage;
|
||||
if (Drawable* const d = getToggleState() ? downImageOn : downImage)
|
||||
return d;
|
||||
|
||||
return d != nullptr ? d : getOverImage();
|
||||
return getOverImage();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue