Skip to content

Commit

Permalink
Allow placing tiles in edges with rect fill tool (#2555)
Browse files Browse the repository at this point in the history
Placing tiles in edges with rect fill tool just won't work for some reason. This fixes that.
  • Loading branch information
MatusGuy authored Jul 22, 2023
1 parent 1720b77 commit 7e8f0ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/editor/overlay_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1616,9 +1616,9 @@ EditorOverlayWidget::align_to_tilemap(const Vector& sp, int tile_size) const
bool
EditorOverlayWidget::is_position_inside_tilemap(const TileMap* tilemap, const Vector& pos) const
{
return pos.x > 0 && pos.y > 0 &&
pos.x <= static_cast<float>(tilemap->get_width()) &&
pos.y <= static_cast<float>(tilemap->get_height());
return pos.x >= 0 && pos.y >= 0 &&
pos.x < static_cast<float>(tilemap->get_width()) &&
pos.y < static_cast<float>(tilemap->get_height());
}

/* EOF */

0 comments on commit 7e8f0ba

Please sign in to comment.