From d8dae84c9a4c60d63f6be02a8edc90839ece488b Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 30 Jul 2019 15:11:13 +0200 Subject: [PATCH] Fixed remote scene tree not collapsing --- editor/script_editor_debugger.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index a749509ce45..f7ff754a0bc 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -418,6 +418,13 @@ int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &node } item->set_metadata(0, id); + // Set current item as collapsed if necessary + if (parent) { + if (!unfold_cache.has(id)) { + item->set_collapsed(true); + } + } + int children_count = nodes[current_index]; // Tracks the total number of items parsed in nodes, this is used to skips nodes that // are not direct children of the current node since we can't know in advance the total