1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fixed remote scene tree not collapsing

This commit is contained in:
Silvano Cerza
2019-07-30 15:11:13 +02:00
parent 7d76f3b393
commit d8dae84c9a

View File

@@ -418,6 +418,13 @@ int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &node
} }
item->set_metadata(0, id); 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]; int children_count = nodes[current_index];
// Tracks the total number of items parsed in nodes, this is used to skips nodes that // 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 // are not direct children of the current node since we can't know in advance the total