Fix possible infinite loop with bucket fill tool
This commit is contained in:
parent
3c857033df
commit
3571087843
1 changed files with 4 additions and 0 deletions
|
@ -351,6 +351,10 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
|
||||||
return PoolVector<Vector2>();
|
return PoolVector<Vector2>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (id == prev_id) {
|
||||||
|
return PoolVector<Vector2>();
|
||||||
|
}
|
||||||
|
|
||||||
Rect2i r = node->get_item_rect();
|
Rect2i r = node->get_item_rect();
|
||||||
r.position = r.position / node->get_cell_size();
|
r.position = r.position / node->get_cell_size();
|
||||||
r.size = r.size / node->get_cell_size();
|
r.size = r.size / node->get_cell_size();
|
||||||
|
|
Loading…
Reference in a new issue