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

Force TreeView to recalculate its size after restoring item openness in TreeView::restoreOpennessState() so that its Viewport scroll position is restored correctly

This commit is contained in:
ed 2017-04-26 10:48:59 +01:00
parent bc78b2f524
commit 79885fc6ad

View file

@ -638,6 +638,9 @@ void TreeView::restoreOpennessState (const XmlElement& newState, const bool rest
{
rootItem->restoreOpennessState (newState);
needsRecalculating = true;
recalculateIfNeeded();
if (newState.hasAttribute ("scrollPos"))
viewport->setViewPosition (viewport->getViewPositionX(),
newState.getIntAttribute ("scrollPos"));