mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17: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,10 +206,12 @@ 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);
|
||||||
|
if (event.button() == GUI::Primary) {
|
||||||
auto index = index_at_event_position(event.position());
|
auto index = index_at_event_position(event.position());
|
||||||
AbstractTableView::set_cursor(index, SelectionUpdate::Set);
|
AbstractTableView::set_cursor(index, SelectionUpdate::Set);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InfinitelyScrollableTableView::mouseup_event(GUI::MouseEvent& event)
|
void InfinitelyScrollableTableView::mouseup_event(GUI::MouseEvent& event)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue