mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 17:11:30 +00:00
TileMap: Fix infinite loop when trying to bucket-delete empty tiles.
Right-clicking when the bucket tool is enabled means "erase all instances of this tile". So it doesn't make sense to try doing this for empty tiles :P Fixes #10065
This commit is contained in:
parent
3ccf0968ff
commit
95da12212b
1 changed files with 2 additions and 0 deletions
|
|
@ -330,6 +330,8 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
|
||||||
|
|
||||||
if (id == TileMap::INVALID_CELL)
|
if (id == TileMap::INVALID_CELL)
|
||||||
return PoolVector<Vector2>();
|
return PoolVector<Vector2>();
|
||||||
|
} else if (prev_id == TileMap::INVALID_CELL) {
|
||||||
|
return PoolVector<Vector2>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect2i r = node->get_item_rect();
|
Rect2i r = node->get_item_rect();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue