diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2022-07-26 12:35:54 +0200 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2022-07-26 12:35:54 +0200 |
commit | 3faa97a58ad63ae85a1233d06c6e319d23ef3564 (patch) | |
tree | b08a1db7260344072aa07096c9e0bb18bcf0299f /scene | |
parent | cc09dc92c8ee06255a158d81533d35c6d2e8d31e (diff) |
Fixes TileMap clear_layer not recreating internal CanvasItems
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/tile_map.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index cf8b6b8f94..5ba8c95a06 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -2652,7 +2652,7 @@ void TileMap::clear_layer(int p_layer) { // Remove all tiles. _clear_layer_internals(p_layer); layers[p_layer].tile_map.clear(); - + _recreate_layer_internals(p_layer); used_rect_cache_dirty = true; } @@ -2662,6 +2662,7 @@ void TileMap::clear() { for (unsigned int i = 0; i < layers.size(); i++) { layers[i].tile_map.clear(); } + _recreate_internals(); used_rect_cache_dirty = true; } |