mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
GTreeView: Prevent doubleclick with right mouse button (#868)
This follows user expectations and prevents interference with context menu handling.
This commit is contained in:
parent
f8ec8cc255
commit
d8daa08359
Notes:
sideshowbarker
2024-07-19 18:31:00 +09:00
Committer: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d8daa083598
1 changed files with 6 additions and 4 deletions
|
@ -94,11 +94,13 @@ void GTreeView::doubleclick_event(GMouseEvent& event)
|
|||
if (!index.is_valid())
|
||||
return;
|
||||
|
||||
if (selection().first() != index)
|
||||
selection().set(index);
|
||||
if (event.button() == GMouseButton::Left) {
|
||||
if (selection().first() != index)
|
||||
selection().set(index);
|
||||
|
||||
if (model.row_count(index))
|
||||
toggle_index(index);
|
||||
if (model.row_count(index))
|
||||
toggle_index(index);
|
||||
}
|
||||
}
|
||||
|
||||
void GTreeView::toggle_index(const GModelIndex& index)
|
||||
|
|
Loading…
Add table
Reference in a new issue