TileSet Export: Avoid invalid error when merge is enabled but file does not exist
(cherry picked from commit 897b33ce77
)
This commit is contained in:
parent
6ce273b329
commit
d950a13c10
|
@ -1266,14 +1266,7 @@ void EditorNode::_dialog_action(String p_file) {
|
||||||
if (FileAccess::exists(p_file)) {
|
if (FileAccess::exists(p_file)) {
|
||||||
ml=ResourceLoader::load(p_file,"TileSet");
|
ml=ResourceLoader::load(p_file,"TileSet");
|
||||||
|
|
||||||
if (!file_export_lib_merge->is_pressed()) {
|
|
||||||
ml->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ml.is_null()) {
|
if (ml.is_null()) {
|
||||||
|
|
||||||
if (file_export_lib_merge->is_pressed()) {
|
if (file_export_lib_merge->is_pressed()) {
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
|
@ -1282,7 +1275,11 @@ void EditorNode::_dialog_action(String p_file) {
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (!file_export_lib_merge->is_pressed()) {
|
||||||
|
ml->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
ml = Ref<TileSet>( memnew( TileSet ));
|
ml = Ref<TileSet>( memnew( TileSet ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue