Only allow built-in scripts to be edited when the scene they belong to is loaded, closes #5403

This commit is contained in:
Juan Linietsky
2016-07-06 20:35:49 -03:00
parent e4b7a45a38
commit a78226c32c
5 changed files with 85 additions and 4 deletions

View File

@@ -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();