LibGUI: Allow dragging a previously unselected item with a single click
Views would previously require that an item be selected before it could be dragged. This patch makes us consider initiating a drag immediately after the view has been selected, without requiring a mouseup event in between.
This commit is contained in:
parent
844c5709ac
commit
a7f4f6afc3
Notes:
sideshowbarker
2024-07-19 01:36:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a7f4f6afc3e
1 changed files with 1 additions and 0 deletions
|
@ -235,6 +235,7 @@ void AbstractView::mousedown_event(MouseEvent& event)
|
|||
set_cursor(index, SelectionUpdate::ClearIfNotSelected);
|
||||
} else {
|
||||
set_cursor(index, SelectionUpdate::Set);
|
||||
m_might_drag = true;
|
||||
}
|
||||
|
||||
update();
|
||||
|
|
Loading…
Add table
Reference in a new issue