From 8cd87c2c16a849ebbc7f2a8b2128b522d28670d7 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sat, 28 Feb 2026 23:08:26 +0100 Subject: [PATCH] Overhaul scene loading and edit state management --- doc/classes/EditorInterface.xml | 2 +- editor/debugger/editor_debugger_node.cpp | 2 +- editor/docks/filesystem_dock.cpp | 2 +- editor/docks/scene_tree_dock.cpp | 2 +- editor/editor_data.cpp | 100 ++++-- editor/editor_data.h | 7 +- editor/editor_interface.cpp | 2 +- editor/editor_node.cpp | 340 ++++++++---------- editor/editor_node.h | 12 +- .../project_upgrade/project_upgrade_tool.cpp | 2 +- ...le_set_scenes_collection_source_editor.cpp | 2 +- editor/scene/canvas_item_editor_plugin.cpp | 4 +- editor/scene/packed_scene_editor_plugin.cpp | 2 +- editor/scene/scene_tree_editor.cpp | 2 +- editor/script/script_editor_plugin.cpp | 2 +- editor/script/script_text_editor.cpp | 2 +- .../version_control_editor_plugin.cpp | 2 +- main/main.cpp | 2 +- 18 files changed, 242 insertions(+), 247 deletions(-) diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 1211578c63b8..5f5a8fdec448 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -450,7 +450,7 @@ - Reloads the scene at the given path. + Reloads the scene at the given path. Fails if the scene is not open. diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index 0f01de5d84b1..54045fe922a9 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -167,7 +167,7 @@ void EditorDebuggerNode::_stack_frame_selected(int p_debugger) { void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p_debugger) { if (!p_file.is_resource_file() && !ResourceCache::has(p_file)) { // If it's a built-in script, make sure the scene is opened first. - EditorNode::get_singleton()->load_scene(p_file.get_slice("::", 0)); + EditorNode::get_singleton()->open_scene(p_file.get_slice("::", 0)); } Ref