summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Ebert Hansen <thomas.ebert.hansen@gmail.com>2019-10-23 15:02:51 +0200
committerThomas Ebert Hansen <thomas.ebert.hansen@gmail.com>2019-10-23 15:02:51 +0200
commitd62ab4ab104b3570106a092ba735a47a5e05e38f (patch)
tree5368ddbd0085716303b9305347f872581a1aa628
parent8c3a5057c54230677b864c0cb157a249f8825f62 (diff)
Fix layout saving error
As a result of commit b49226e085 FileAccess::open no longer returns ERR_CANT_OPEN if the file cannot be found/opened. Instead check against ERR_FILE_NOT_FOUND or ERR_FILE_CANT_OPEN.
-rw-r--r--editor/editor_node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 6e2a4810cd..366d415445 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1470,7 +1470,7 @@ void EditorNode::_dialog_action(String p_file) {
config.instance();
Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
- if (err == ERR_CANT_OPEN) {
+ if (err == ERR_FILE_CANT_OPEN || err == ERR_FILE_NOT_FOUND) {
config.instance(); // new config
} else if (err != OK) {
show_warning(TTR("Error trying to save layout!"));