diff options
| author | robfram | 2018-03-24 19:16:47 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-04-28 17:22:42 +0200 |
| commit | 91525e3075ce2db913dbfb8acd2f9032d59d793c (patch) | |
| tree | e1ea0ed80c47df18766017074983f3eed5eda6c4 | |
| parent | 7563c17113790fe66a816c781001791bd571ef3c (diff) | |
| download | godot-91525e3075ce2db913dbfb8acd2f9032d59d793c.tar.gz godot-91525e3075ce2db913dbfb8acd2f9032d59d793c.tar.zst godot-91525e3075ce2db913dbfb8acd2f9032d59d793c.zip | |
Fix bug added in PR#17589. Resources couldn't be saved to files
This PR fixes the code to avoid saving default environment every time
the project is run whitin the editor.
Should fix #17727. Sorry for the troubles!
(cherry picked from commit 7821b70a00768cb99c0b48450eabe5a687ae276c)
| -rw-r--r-- | editor/editor_node.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0bff56bec..a404f8369 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -587,9 +587,6 @@ void EditorNode::open_resource(const String &p_type) { void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const String &p_path) { editor_data.apply_changes_in_editors(); - if (p_resource->get_last_modified_time() == p_resource->get_import_last_modified_time()) { - return; - } int flg = 0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) @@ -1435,7 +1432,8 @@ 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); - save_resource_in_path(fallback, fallback->get_path()); + if (fallback->get_last_modified_time() != fallback->get_import_last_modified_time()) + save_resource_in_path(fallback, fallback->get_path()); } } |
