summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-03-26 16:59:35 +0200
committerYuri Sizov <yuris@humnom.net>2023-03-30 19:16:33 +0200
commit47c4044d0306a2eecfe03309c30965695151797a (patch)
treee26926418636f818bd51bd8a2d4503f51a103934
parent838a82f8858c859a9ceda4049904bf263604cbd4 (diff)
TileSet editor AtlasMergingDialog crash fix
(cherry picked from commit c72b09639ad5a8644a1fd3bb61c5e2cca8483808)
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index 8404ea0969..ce5da811c1 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -95,7 +95,9 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
}
}
+ merged->set_name(p_atlas_sources[0]->get_name());
merged->set_texture(ImageTexture::create_from_image(output_image));
+ merged->set_texture_region_size(new_texture_region_size);
// Copy the tiles to the merged TileSetAtlasSource.
for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) {
@@ -130,9 +132,6 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
}
}
}
-
- merged->set_name(p_atlas_sources[0]->get_name());
- merged->set_texture_region_size(new_texture_region_size);
}
}