Closed Kvaz1r closed 5 years ago
It took me a long time to reproduce this, but I did finally get it. The LayoutChildren
call in ScrollLayout
(used by the ProjectTree
) will call SetScrollOffset
, which will call Relayout
if the change in the size of the children causes the scroll offset to change. You have to have scrolled down in the ProjectTree
, then minimized some elements of the tree until there is empty space below the last elements. In this case, LayoutChildren
will try to scroll using SetScrollOffset
to fill up that empty space. SetScrollOffset
will see that the offset changed and try to call Relayout
. Relayout
will discover that it's already in LayoutChildren
and panic.
nelsam/gxui#17 solves it for me.
Description
panic: Cannot call Relayout() while in LayoutChildren when collapsing(hiding) elements of the toc tree.
Steps to reproduce
Expected behavior
Hiding of elements
Actual behavior
panic
Stack trace