summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index edb6fee75c..db4d46cd18 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3818,6 +3818,14 @@ void EditorNode::_set_current_scene_nocheck(int p_idx) {
}
}
+ if (editor_data.check_and_update_scene(p_idx)) {
+ if (!editor_data.get_scene_path(p_idx).is_empty()) {
+ editor_folding.load_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
+ }
+
+ EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_scene_history_id(p_idx));
+ }
+
Dictionary state = editor_data.restore_edited_scene_state(editor_selection, &editor_history);
_edit_current(true);
@@ -3827,14 +3835,6 @@ void EditorNode::_set_current_scene_nocheck(int p_idx) {
if (tabs_to_close.is_empty()) {
callable_mp(this, &EditorNode::_set_main_scene_state).call_deferred(state, get_edited_scene()); // Do after everything else is done setting up.
}
-
- if (editor_data.check_and_update_scene(p_idx)) {
- if (!editor_data.get_scene_path(p_idx).is_empty()) {
- editor_folding.load_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
- }
-
- EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_scene_history_id(p_idx));
- }
}
void EditorNode::setup_color_picker(ColorPicker *p_picker) {