From 6efbabeb9e1e196538934d3be5ae05541f610eb9 Mon Sep 17 00:00:00 2001 From: Emmanuel Barroga Date: Sun, 8 Sep 2019 19:52:37 -0700 Subject: [PATCH] Fix Remote Tree Navigate to Inspected Fixes the regression of remote-tree not navigating to what is being inspected in the inspector. --- editor/script_editor_debugger.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 6ee09012a51..1223dbadedb 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -434,6 +434,15 @@ int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &node } item->set_metadata(0, id); + if (id == inspected_object_id) { + TreeItem *cti = item->get_parent(); + while (cti) { + cti->set_collapsed(false); + cti = cti->get_parent(); + } + item->select(0); + } + // Set current item as collapsed if necessary if (parent) { if (!unfold_cache.has(id)) {