diff --git a/src/nostalgia/core/studio/tilesheeteditormodel.cpp b/src/nostalgia/core/studio/tilesheeteditormodel.cpp index cf4e31a0..11afdc84 100644 --- a/src/nostalgia/core/studio/tilesheeteditormodel.cpp +++ b/src/nostalgia/core/studio/tilesheeteditormodel.cpp @@ -490,6 +490,11 @@ void TileSheetEditorModel::select(const geo::Point &pt) noexcept { void TileSheetEditorModel::completeSelection() noexcept { m_selectionOngoing = false; + auto s = activeSubSheet(); + auto pt = m_selectionBounds.pt2(); + pt.x = ox::min(s->columns * TileWidth, pt.x); + pt.y = ox::min(s->rows * TileHeight, pt.y); + m_selectionBounds.setPt2(pt); } void TileSheetEditorModel::clearSelection() noexcept {