mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibGUI: Views should ignore double clicks that don't hit any index
This commit is contained in:
parent
e499b0f161
commit
844c5709ac
Notes:
sideshowbarker
2024-07-19 01:36:10 +09:00
Author: https://github.com/awesomekling
Commit: 844c5709ac
1 changed files with 5 additions and 2 deletions
|
@ -364,9 +364,12 @@ void AbstractView::doubleclick_event(MouseEvent& event)
|
|||
|
||||
auto index = index_at_event_position(event.position());
|
||||
|
||||
if (!index.is_valid())
|
||||
if (!index.is_valid()) {
|
||||
clear_selection();
|
||||
else if (!m_selection.contains(index))
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_selection.contains(index))
|
||||
set_selection(index);
|
||||
|
||||
if (is_editable() && edit_triggers() & EditTrigger::DoubleClicked)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue