mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Accessibility: Fixed a potential crash when re-using custom ListBox components
This commit is contained in:
parent
972c45a76e
commit
64896eefcd
1 changed files with 4 additions and 5 deletions
|
|
@ -79,12 +79,7 @@ public:
|
|||
row = newRow;
|
||||
|
||||
if (selectionHasChanged)
|
||||
{
|
||||
isSelected = nowSelected;
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
isSelected ? handler->grabFocus() : handler->giveAwayFocus();
|
||||
}
|
||||
}
|
||||
|
||||
if (auto* m = owner.getModel())
|
||||
|
|
@ -102,6 +97,10 @@ public:
|
|||
invalidateAccessibilityHandler();
|
||||
}
|
||||
}
|
||||
|
||||
if (selectionHasChanged)
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
isSelected ? handler->grabFocus() : handler->giveAwayFocus();
|
||||
}
|
||||
|
||||
void performSelection (const MouseEvent& e, bool isMouseUp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue