f0db870822
Adds support for saving some view state persistently and uses this to keep the height of a tree-view, even as the region containing it is hidden, or the file re-loaded. Fixes #129058. Basically the design is to have state stored in the region, so it can be saved to files. Views types (tree-view, grid-view, etc) can decide themselves if they have state to be preserved, and what state that is. If a view wants to preserve state, it's stored in a list inside the region, identified by the view's idname. Limitation is that multiple instances of the same view would share these bits of state, in practice I don't think that's ever an issue. More state can be added to be preserved as needed. Since different kinds of views may require different state, I was thinking we could add ID properties to `uiViewState` even, making it much more dynamic. Pull Request: https://projects.blender.org/blender/blender/pulls/130292