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

Accessibility: Set TreeViewItem expanded/collapsed state only when it has sub-items

This commit is contained in:
ed 2021-06-09 09:10:11 +01:00
parent a7f33da900
commit cdee88c003

View file

@ -112,12 +112,14 @@ private:
}
if (treeItem.mightContainSubItems())
{
state = state.withExpandable();
if (treeItem.isOpen())
state = state.withExpanded();
else
state = state.withCollapsed();
if (treeItem.isOpen())
state = state.withExpanded();
else
state = state.withCollapsed();
}
if (treeItem.isSelected())
state = state.withSelected();