diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-06-29 09:05:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-29 09:05:42 +0200 |
commit | b7f17a100d43af1df6ff11f2a81d1aeb170d2d69 (patch) | |
tree | 37a6f725b081ee3a6c262f9431d3576f96ad4444 /editor | |
parent | 54988df9ce0227d9f933f6f82e2f9f1d35df28c0 (diff) | |
parent | 5d7f9f804a238f48115b488b93261f68940d3eb5 (diff) |
Merge pull request #19836 from akien-mga/save-subresources
Revert "Fix saving unmodified scenes and resources"
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 52f356813a..f099f29204 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -587,7 +587,6 @@ void EditorNode::edit_node(Node *p_node) { void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const String &p_path) { editor_data.apply_changes_in_editors(); - int flg = 0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg |= ResourceSaver::FLAG_COMPRESS; @@ -1074,8 +1073,7 @@ void EditorNode::_save_scene(String p_file, int idx) { void EditorNode::_save_all_scenes() { - int i = _next_unsaved_scene(true, 0); - while (i != -1) { + for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { Node *scene = editor_data.get_edited_scene_root(i); if (scene && scene->get_filename() != "") { if (i != editor_data.get_edited_scene()) @@ -1083,7 +1081,6 @@ void EditorNode::_save_all_scenes() { else _save_scene_with_preview(scene->get_filename()); } // else: ignore new scenes - i = _next_unsaved_scene(true, ++i); } _save_default_environment(); @@ -1359,8 +1356,7 @@ void EditorNode::_save_default_environment() { if (fallback.is_valid() && fallback->get_path().is_resource_file()) { Map<RES, bool> processed; _find_and_save_edited_subresources(fallback.ptr(), processed, 0); - if (fallback->get_last_modified_time() != fallback->get_import_last_modified_time()) - save_resource_in_path(fallback, fallback->get_path()); + save_resource_in_path(fallback, fallback->get_path()); } } |