From dc62389739bcc9ece889230cdd07cc6a2cb04a2d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 18 Aug 2017 10:59:31 -0300 Subject: -Properly check limits to objects sent (regarding to size), fixes #9034 -Changed the way objects are marshalled and sent to the debugger -Editing debugged objects happens in the remote inspector now --- editor/script_editor_debugger.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'editor/script_editor_debugger.cpp') diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 01cfdc1b5..bcf24b98f 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -372,7 +372,13 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da if (has_icon(p_data[i + 2], "EditorIcons")) it->set_icon(0, get_icon(p_data[i + 2], "EditorIcons")); it->set_metadata(0, id); + if (id == inspected_object_id) { + TreeItem *cti = it->get_parent(); //ensure selected is always uncollapsed + while (cti) { + cti->set_collapsed(false); + cti = cti->get_parent(); + } it->select(0); } @@ -385,6 +391,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da it->set_collapsed(true); } } + lv[level] = it; } updating_scene_tree = false; @@ -439,11 +446,8 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da inspected_object->last_edited_id = id; - if (tabs->get_current_tab() == 2) { - inspect_properties->edit(inspected_object); - } else { - editor->push_item(inspected_object); - } + tabs->set_current_tab(inspect_info->get_index()); + inspect_properties->edit(inspected_object); } else if (p_msg == "message:video_mem") { -- cgit v1.2.3-70-g09d2