make list view selection box rectangle inclusive

This commit is contained in:
nakst 2021-11-25 20:39:03 +00:00
parent d7128d52ed
commit 1781b060a7
1 changed files with 4 additions and 0 deletions

View File

@ -1806,6 +1806,10 @@ struct EsListView : EsElement {
selectionBoxPositionX = message->mouseDragged.newPositionX + scroll.position[0]; selectionBoxPositionX = message->mouseDragged.newPositionX + scroll.position[0];
selectionBoxPositionY = message->mouseDragged.newPositionY + scroll.position[1]; selectionBoxPositionY = message->mouseDragged.newPositionY + scroll.position[1];
// Inclusive rectangle.
if (selectionBoxPositionX >= selectionBoxAnchorX) selectionBoxPositionX++;
if (selectionBoxPositionY >= selectionBoxAnchorY) selectionBoxPositionY++;
SelectPreview(); SelectPreview();
} else if (flags & ES_LIST_VIEW_CHOICE_SELECT) { } else if (flags & ES_LIST_VIEW_CHOICE_SELECT) {
DragSelect(); DragSelect();