X Tutup
Skip to content

Should expand root when auto_expand is on#111393

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
xuhuisheng:dev/auto_expand_selected
Oct 10, 2025
Merged

Should expand root when auto_expand is on#111393
Repiteo merged 1 commit intogodotengine:masterfrom
xuhuisheng:dev/auto_expand_selected

Conversation

@xuhuisheng
Copy link
Contributor

@xuhuisheng xuhuisheng commented Oct 8, 2025

It is obvious that the logic of not expanding the root node is incorrect。

@xuhuisheng xuhuisheng requested a review from a team October 8, 2025 05:23
@AThousandShips AThousandShips added bug topic:editor cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Oct 8, 2025
@AThousandShips AThousandShips added this to the 4.6 milestone Oct 8, 2025
@AThousandShips AThousandShips removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Oct 8, 2025
@PabloDevGit
Copy link

PabloDevGit commented Oct 10, 2025

I’d like to test this.
Maybe it’s not just about the main node — the tree, even if it’s expanded, shouldn’t expand unexpanded children if the node selected in the 2D editor is a child of a child of the tree’s main node.

I’m not sure if what I mean is clear — that is, if the option isn’t enabled, the tree won’t expand beyond what’s already expanded.

If the option is checked, the tree will expand until it reaches the node selected in the 2D editor.

@xuhuisheng
Copy link
Contributor Author

xuhuisheng commented Oct 10, 2025

I’d like to test this. Maybe it’s not just about the main node — the tree, even if it’s expanded, shouldn’t expand unexpanded children if the node selected in the 2D editor is a child of a child of the tree’s main node.

I’m not sure if what I mean is clear — that is, if the option isn’t enabled, the tree won’t expand beyond what’s already expanded.

If the option is checked, the tree will expand until it reaches the node selected in the 2D editor.

@Torguen

My description makes some confusion. The original function tried to expand tree node from selected node to all of parents, but only forgot to expand root node. So my patch fixed the last part - root node, to fix this issue.

@akien-mga akien-mga changed the title Should expand root when auto_expand is on Should expand root when auto_expand is on Oct 10, 2025
@Repiteo Repiteo merged commit fb01d80 into godotengine:master Oct 10, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 10, 2025

Thanks! Congratulations on your first merged contribution! 🎉

@xuhuisheng xuhuisheng deleted the dev/auto_expand_selected branch October 12, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Auto Expand to Selected Node" option does nothing

5 participants

X Tutup