diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 1f9125b9ea5..cd1aae5ddd7 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -86,6 +86,20 @@ void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int bool has_prev = current >= 0 && current < history.size(); if (has_prev) { + + if (obj->is_type("ScriptEditorDebuggerInspectedObject")) { + for (int i = current; i >= 0; i--) { + Object *pre_obj = ObjectDB::get_instance(get_history_obj(i)); + if (pre_obj->is_type("ScriptEditorDebuggerInspectedObject")) { + if (pre_obj->call("get_remote_object_id") == obj->call("get_remote_object_id")) { + History &pr = history[i]; + pr.path[pr.path.size() - 1] = o; + current = i; + return; + } + } + } + } history.resize(current + 1); //clip history to next } diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 6f558715776..cf1ab1e3b34 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -3618,6 +3618,7 @@ void PropertyEditor::edit(Object *p_object) { if (obj) { + set_enable_capitalize_paths(true); obj->remove_change_receptor(this); if (obj->is_type("ScriptEditorDebuggerInspectedObject")) { diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 19f9b31820f..22291dd70ad 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -497,7 +497,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } inspected_object_id = id; - debugObj->update(); editor->push_item(debugObj, ""); } else if (p_msg == "message:video_mem") { @@ -1000,12 +999,7 @@ void ScriptEditorDebugger::_notification(int p_what) { if (inspect_scene_tree->is_visible()) _scene_tree_request(); - bool need_query_instance = inspected_object_id != 0; - need_query_instance = need_query_instance && editor->get_property_editor()->is_visible(); - need_query_instance = need_query_instance && (editor->get_property_editor()->obj != NULL); - need_query_instance = need_query_instance && editor->get_property_editor()->obj->is_type("ScriptEditorDebuggerInspectedObject"); - need_query_instance = need_query_instance && ((ObjectID)editor->get_property_editor()->obj->call("get_remote_object_id") != 0); - if (need_query_instance) { + if (inspected_object_id != 0 && editor->get_property_editor()->is_visible() && (editor->get_property_editor()->obj != NULL) && editor->get_property_editor()->obj->is_type("ScriptEditorDebuggerInspectedObject") && ((ObjectID)editor->get_property_editor()->obj->call("get_remote_object_id") != 0)) { Array msg; msg.push_back("inspect_object"); msg.push_back(inspected_object_id);