diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-19 11:30:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 11:30:11 +0200 |
commit | 0e5b0c025ce3d4ad8082cbeb5394423854c2e25f (patch) | |
tree | a11bb490805dcc5003bbf67ad7feb97275f90f5f /editor | |
parent | b1063a7c02c313719fed660feba544dbcd1dac89 (diff) | |
parent | 1a605096998ca33c84946eca0834e8a7963656a7 (diff) |
Merge pull request #52474 from KoBeWi/script_remover_3000
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_data.cpp | 4 | ||||
-rw-r--r-- | editor/editor_node.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index e40bbefef8..5e50835ef2 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -566,6 +566,10 @@ void EditorData::remove_scene(int p_idx) { current_edited_scene--; } + if (edited_scene[p_idx].path != String()) { + ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path); + } + edited_scene.remove(p_idx); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 812bbd9b7d..d8f0367b33 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3278,10 +3278,6 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) { new_index = 1; } - if (editor_data.get_scene_path(old_index) != String()) { - ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(editor_data.get_scene_path(old_index)); - } - if (p_change_tab) { _scene_tab_changed(new_index); } |