summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-26 13:22:54 +0200
committerGitHub <noreply@github.com>2022-07-26 13:22:54 +0200
commit0ffc28e3de3638be8fe0e4fab146dcf1e0716f6d (patch)
tree8634fc30c9f9c3b22a1a6dce0776711ce9edcc09 /scene
parentf94b4dbe224687c03b4703f2c7efde01f3935b2e (diff)
parent3faa97a58ad63ae85a1233d06c6e319d23ef3564 (diff)
Merge pull request #63484 from groud/fix_tilemap_clear_layer
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/tile_map.cpp3
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;
}