| 3717 | } |
| 3718 | |
| 3719 | int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) { |
| 3720 | for (int i = p_start; i < editor_data.get_edited_scene_count(); i++) { |
| 3721 | if (!editor_data.get_edited_scene_root(i)) { |
| 3722 | continue; |
| 3723 | } |
| 3724 | |
| 3725 | String scene_filename = editor_data.get_edited_scene_root(i)->get_scene_file_path(); |
| 3726 | if (p_valid_filename && scene_filename.is_empty()) { |
| 3727 | continue; |
| 3728 | } |
| 3729 | |
| 3730 | bool unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_scene_history_id(i)); |
| 3731 | if (unsaved) { |
| 3732 | return i; |
| 3733 | } else { |
| 3734 | for (int j = 0; j < editor_data.get_editor_plugin_count(); j++) { |
| 3735 | if (!editor_data.get_editor_plugin(j)->get_unsaved_status(scene_filename).is_empty()) { |
| 3736 | return i; |
| 3737 | } |
| 3738 | } |
| 3739 | } |
| 3740 | } |
| 3741 | return -1; |
| 3742 | } |
| 3743 | |
| 3744 | void EditorNode::_exit_editor(int p_exit_code) { |
| 3745 | exiting = true; |
nothing calls this directly
no test coverage detected