[nostalgia/core/studio] Fix select not to go beyond the appropriate idx
This commit is contained in:
parent
a02d496de5
commit
041e571626
@ -490,6 +490,11 @@ void TileSheetEditorModel::select(const geo::Point &pt) noexcept {
|
|||||||
|
|
||||||
void TileSheetEditorModel::completeSelection() noexcept {
|
void TileSheetEditorModel::completeSelection() noexcept {
|
||||||
m_selectionOngoing = false;
|
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 {
|
void TileSheetEditorModel::clearSelection() noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user