1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibGUI: Double-clicking on a TreeView item should set cursor

Don't just set the selection, set the cursor.
This commit is contained in:
Andreas Kling 2020-09-16 15:30:16 +02:00
parent 95b6c98435
commit f69281573e

View file

@ -99,8 +99,7 @@ void TreeView::doubleclick_event(MouseEvent& event)
return;
if (event.button() == MouseButton::Left) {
if (selection().first() != index)
selection().set(index);
set_cursor(index, SelectionUpdate::Set);
if (model.row_count(index))
toggle_index(index);