If a view with a sidebar-item is restored from a state which was created when the sidebar-item was not present yet, the state cannot be restored.
This is caused by the expanded-state, which is fetched from the viewstate. It is stored as a list of booleans. If the number of sidebar-items exceeds the number of items in the list, the program crashes with an exception (see attachment).
At least the number of sidebar-items should be checked against the number of items in the list and a default-value should be set to all remaining items if applicable.
Furthermore using a simple list might not work if a new sidebar-item is inserted between two other items, since the mapping will become incorrect. Maybe we shouldrethink the use of this datastructure.
Replaced the list with a map and extended the class SideBarItem with a key to uniquely identify sidebar items in this map ([69880e]). This update breaks session compatibility one-time.
Related
Commit: [69880e]
The changes for this bug seem to cause problems: The side bar element 'Zoom' of the scaffold tree view is broken and only shows a blank screen. Please investigate the reason for this and make sure that all sidebar elements work.
There were problems with duplicated keys, so the expanded-state of the zoom-item was overwritten with the state of another item ([1c0272] ). Also fixed a similiar bug (and [2a0b08]).
The zoom-item itself seems to be ok. Looks like it shows a blank screen since the cursor pointed to a white area in the view.
Related
Commit: [1c0272]
Commit: [2a0b08]
Works fine! Thanks!
merged in [2829f9]
Related
Commit: [2829f9]