mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +00:00
Spreadsheet: Only update the selection on primary mousedown
Otherwise we'd end up clearing the selected rect before doing anything with it if the user right-clicks on it.
This commit is contained in:
parent
0d302516d5
commit
8919e4b2b6
1 changed files with 4 additions and 2 deletions
|
@ -206,8 +206,10 @@ void InfinitelyScrollableTableView::mousedown_event(GUI::MouseEvent& event)
|
||||||
AbstractTableView::mousedown_event(adjusted_event);
|
AbstractTableView::mousedown_event(adjusted_event);
|
||||||
} else {
|
} else {
|
||||||
AbstractTableView::mousedown_event(event);
|
AbstractTableView::mousedown_event(event);
|
||||||
auto index = index_at_event_position(event.position());
|
if (event.button() == GUI::Primary) {
|
||||||
AbstractTableView::set_cursor(index, SelectionUpdate::Set);
|
auto index = index_at_event_position(event.position());
|
||||||
|
AbstractTableView::set_cursor(index, SelectionUpdate::Set);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue