Skip to content

don't re-expand SaR tree nodes if they are already expanded#3829

Open
DenSinH wants to merge 1 commit into
ControlSystemStudio:masterfrom
High-Voltage-Engineering:dh-dont-reexpand-sar-nodes
Open

don't re-expand SaR tree nodes if they are already expanded#3829
DenSinH wants to merge 1 commit into
ControlSystemStudio:masterfrom
High-Voltage-Engineering:dh-dont-reexpand-sar-nodes

Conversation

@DenSinH

@DenSinH DenSinH commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Checklist

Before: opening a save and restore snapshot through a display builder OPEN_SAR_NODE action would (on first click) open the folders up to the snapshot's parent, but NOT the snapshot's parent itself. On second click, it would open the proper node. The issue was that both locateNode and the treeview event handler:

treeView.getRoot().addEventHandler(TreeItem.<Node>branchExpandedEvent(), e -> expandTreeNode(e.getTreeItem()));

called the expandTreeNode handler, which caused it to "expand" the parent folder twice, making it closed on the second call.

(Example trying to open acc/accelerator/oper)

image

After: this is fixed, now the node is opened right away.

image
  • Testing:

The bug is no longer present

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant