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:
parent
c6e40e1c01
commit
0b5c4216c8
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue