1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix TileMap drawing itself twice on creation

Adds a check before calling `item_rect_changed()` in
`_recompute_rect_cache()` of `scene/2d/tile_map.cpp`. Makes sure
TileMap is only redrawn if the rect is actually changed.
Fixes #69754
This commit is contained in:
Vladislav Slobodenyuk
2022-12-09 22:20:08 +09:00
parent c6e40e1c01
commit 0b5c4216c8

View File

@@ -995,9 +995,11 @@ void TileMap::_recompute_rect_cache() {
}
}
bool changed = rect_cache != r_total;
rect_cache = r_total;
item_rect_changed();
item_rect_changed(changed);
rect_cache_dirty = false;
#endif