You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calinou
changed the title
The scroll of the tree is restarted when changing the tab
Editor scene tree dock scrolling is not persisted when items are removed then readded
Aug 27, 2021
Calinou
changed the title
Editor scene tree dock scrolling is not persisted when items are removed then readded
Editor scene tree dock scrolling is not persisted when items are removed then readded (which occurs when switching scene tabs)
Aug 27, 2021
Sorry I did not understand.
It is not what I expected, for me it is logical that the scroll should remain where I left it when I changed the scene in the tabs, so what is the discussion ?.
I mean, isn't that logical for everyone?, the scroll should persist when switching tabs.
I think this is expected. When elements are removed from the tree then readded, there is no logic for Tree to restore its previous scroll position.
The same thing likely happens with ScrollContainer in general.
I think a good fix would be for the scene tree dock to store a separate scene tree for each scene tab, and to swap the scene tree when you change tab, rather than having to regenerate the whole scene tree each time you change tabs. That way, the ScrollContainer's current position persists between switching tabs since it never clears the old scene tree.
This may result in more memory usage by keeping the scene tree stored for each open tab, but it seems like a more elegant solution than just storing the previous scroll position and restoring it when you change a tab. Wouldn't it also make switching tabs more responsive since it doesn't have to do a full regeneration of the scene tree when it's opened, especially for large scenes?
Godot version
3.3.3 stable mono
System information
w10 64
Issue description
the tree scroll restarts when the tab is changed
Steps to reproduce
view the gif
Minimal reproduction project
not necessary
The text was updated successfully, but these errors were encountered: