1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

should expand root when auto_expand is on

This commit is contained in:
xuhuisheng
2025-10-08 13:19:23 +08:00
parent d61cd9149a
commit 4ba09aceb9

View File

@@ -1444,7 +1444,7 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
if (auto_expand_selected) {
// Make visible when it's collapsed.
TreeItem *node = item->get_parent();
while (node && node != tree->get_root()) {
while (node) {
node->set_collapsed(false);
node = node->get_parent();
}