summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-24 19:32:49 +0100
committerGitHub <noreply@github.com>2018-03-24 19:32:49 +0100
commitee6a2c5fbff38a28cc421ce33471c36e44ab08c1 (patch)
tree41585ed630fe241b1ca371d9d728dd767edfae25 /editor
parentfd79de01c20168075dbf425831ac44f2b676f275 (diff)
parent7821b70a00768cb99c0b48450eabe5a687ae276c (diff)
Merge pull request #17747 from robfram/fix-PR-17589
Fix bug added in PR #17589. Resources couldn't be saved to files
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 364e989c84..7936cf446f 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -610,9 +610,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"))
@@ -1459,7 +1456,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());
}
}