Bug in Treeview with root item invisible

Just starting playing around with JUCE 6, and while updating everything, noticing a graphic change from previous versions… Where changing the rootItem will very briefly flash the items offset by 20 pixels.


Regular speed and then slow speed.

After a few hours I determined it’s down to Treeview.cpp TreeView::TreeViewport::handleAsyncUpdate

Specifically const auto startY = owner.rootItemVisible ? 0 : -root->itemHeight the first time called itemHeight hasn’t been calculated yet, so it’s zero… not until updatePositions is called on the next line does itemHeight = getItemHeight() get called…

if (!owner.rootItemVisible && root->itemHeight==0)

            const auto startY = owner.rootItemVisible ? 0 : -root->itemHeight;
            root->updatePositions (startY);

Seems to take care of things

I’m having trouble reproducing this on Windows and macOS.

Are you doing anything like setting item height dynamically?