diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-01-08 18:04:36 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-01-08 18:04:36 +0100 |
commit | e3d4a851b7e1707d9068a9294b3bf26ad0845b35 (patch) | |
tree | e83918d9dd93f3131511142f96d13379a3783860 /tools | |
parent | 3ad263eafe51a5d0a199c08e11ec1dca71d2e6cc (diff) | |
parent | b4602567cfdecd5f3d0772afb93ba93841d60b3c (diff) |
Merge pull request #3280 from neikeq/issue_3227
Fix TileSet not refreshed after exporting without merge
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/editor_node.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index f180a26e7b..2f43cb5064 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<TileSet> 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<TileSet>( memnew( TileSet )); } |