fix: apply selected to the scene-graph node and seed tree rows from node state - #67
Merged
Merged
Conversation
LKasianAnsys
marked this pull request as ready for review
September 3, 2026 17:15
margalva
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Addresses #18
Context
The source of truth of the 'visible' and 'selected' per-part properties is the server (after #18), and we expect that they are preserved across browser refresh and that they are sourced as expected on a load_state.
3 bugs: On main, we see the following bugs with the 'selected' and 'visible' per-part properties.
_selected: true, but on a refresh, the new VisorPartState shows_selected: false. So the actual 'selected' property doesn't make it across a refresh.The underlying issues of the above predate the changes from #18, but the changes exposed some further symptoms.
This PR fixes the three bugs, so that 'visible' and 'selected' are preserved across browser refresh and on a load_state call.
Description
This pull request enhances the way selection and visibility state are managed and synchronized between scene-graph nodes and the tree view in the Visor frontend. Now, selection and visibility are properties owned by the nodes themselves, and the tree view derives its row states directly from these node properties. This leads to more robust and predictable UI behavior, especially when nodes are modified outside the tree view. Additionally, new tests have been added to verify correct seeding of row state from the underlying nodes.
Improvements to Scene-Graph and Tree Synchronization:
selectedproperty is now applied directly to scene-graph nodes, and tree rows derive their selection state from the node, ensuring consistent selection between the scene and the tree. [1] [2] [3]TreeView Interface and Utility Updates:
ITreeViewNodeinterface has been extended to include aselectedproperty, clarifying the contract for nodes in the tree view.Testing Enhancements: