Skip to content

Annotation tree: preserve expanded state on change

David Faure requested to merge work/dfaure/serialize_tree_state into master

When adding/removing an annotation, the tree would collapse completely every time, due to the model being fully reset().

Handling row insertion/removal in the proxies would lead to very complicated code, so instead use KViewStateSerializer to save/restore the expanded state, based on displayed texts (e.g. "Page 4 / David Faure").

This required splitting up rebuildIndexes() so we can save on aboutToBeReset and restore on reset().

Merge request reports