Merge pull request #63484 from groud/fix_tilemap_clear_layer

This commit is contained in:
Rémi Verschelde 2022-07-26 13:22:54 +02:00 committed by GitHub
commit 0ffc28e3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}