summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 4f87838014..f73eb81473 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1279,11 +1279,9 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
return;
}
}
- } else {
- if (FileAccess::exists(path + ".import")) {
- show_warning(TTR("This resource can't be saved because it was imported from another file. Make it unique first."));
- return;
- }
+ } else if (FileAccess::exists(path + ".import")) {
+ show_warning(TTR("This resource can't be saved because it was imported from another file. Make it unique first."));
+ return;
}
}
@@ -4063,11 +4061,9 @@ bool EditorNode::is_resource_read_only(Ref<Resource> p_resource, bool p_foreign_
}
}
}
- } else {
+ } else if (FileAccess::exists(path + ".import")) {
// The resource is not a subresource, but if it has an .import file, it's imported so treat it as read only.
- if (FileAccess::exists(path + ".import")) {
- return true;
- }
+ return true;
}
return false;