From b4602567cfdecd5f3d0772afb93ba93841d60b3c Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 8 Jan 2016 17:54:13 +0100 Subject: Fix TileSet not refreshed after exporting without merge --- tools/editor/editor_node.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 9fe0409c0e..50361568fd 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1321,10 +1321,18 @@ void EditorNode::_dialog_action(String p_file) { case FILE_EXPORT_TILESET: { Ref ml; - if (file_export_lib_merge->is_pressed() && FileAccess::exists(p_file)) { + if (FileAccess::exists(p_file)) { ml=ResourceLoader::load(p_file,"TileSet"); - if (ml.is_null()) { + 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.."); @@ -1333,9 +1341,6 @@ void EditorNode::_dialog_action(String p_file) { return; } - } - - if (ml.is_null()) { ml = Ref( memnew( TileSet )); } -- cgit v1.2.3