summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-03-11 07:10:48 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-03-11 07:10:48 +0100
commitebc581becfc78e29ff82c2ea955e2d1ed0b6e825 (patch)
tree82ea44813b2baa4516c0c16561d3f81582e5654e /tools/editor
parentc6e57bf514cb3cfd12f5eae9a96b0e0cef3af923 (diff)
parent897b33ce77dee4ba22ce30aede7784eec73f9c64 (diff)
Merge pull request #4011 from neikeq/fix_regr_3280
TileSet Export: Avoid invalid error when merge is enabled but file doesn't exist
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_node.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index b620e15670..dfc1c7455c 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1267,23 +1267,20 @@ void EditorNode::_dialog_action(String p_file) {
if (FileAccess::exists(p_file)) {
ml=ResourceLoader::load(p_file,"TileSet");
- if (!file_export_lib_merge->is_pressed()) {
+ if (ml.is_null()) {
+ if (file_export_lib_merge->is_pressed()) {
+ current_option=-1;
+ //accept->get_cancel()->hide();
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("Can't load TileSet for merging!.");
+ accept->popup_centered_minsize();
+ return;
+ }
+ } else if (!file_export_lib_merge->is_pressed()) {
ml->clear();
}
- }
-
- if (ml.is_null()) {
-
- if (file_export_lib_merge->is_pressed()) {
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Can't load TileSet for merging!.");
- accept->popup_centered_minsize();
- return;
- }
-
+ } else {
ml = Ref<TileSet>( memnew( TileSet ));
}