diff options
| author | Juan Linietsky | 2016-07-06 20:35:49 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-07-06 20:36:37 -0300 |
| commit | a78226c32ceb0614e079f5cdd5653af7be729dac (patch) | |
| tree | 998cfe40fe7f4239c3200f654148e0282c826796 /tools/editor/editor_node.cpp | |
| parent | e4b7a45a381f028752163d0f57662baa0def0301 (diff) | |
| download | godot-a78226c32ceb0614e079f5cdd5653af7be729dac.tar.gz godot-a78226c32ceb0614e079f5cdd5653af7be729dac.tar.zst godot-a78226c32ceb0614e079f5cdd5653af7be729dac.zip | |
Only allow built-in scripts to be edited when the scene they belong to is loaded, closes #5403
Diffstat (limited to 'tools/editor/editor_node.cpp')
| -rw-r--r-- | tools/editor/editor_node.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index ae632ab38..56d745dee 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -3133,6 +3133,11 @@ void EditorNode::_remove_edited_scene() { 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)); + } _scene_tab_changed(new_index); editor_data.remove_scene(old_index); editor_data.get_undo_redo().clear_history(); |
