mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibGUI: Fix assertion failure in GItemView::mouse_up()
This commit is contained in:
parent
d2e49719c4
commit
75c5e9af56
Notes:
sideshowbarker
2024-07-19 10:10:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/75c5e9af563
1 changed files with 6 additions and 4 deletions
|
@ -149,10 +149,12 @@ void GItemView::mouseup_event(GMouseEvent& event)
|
|||
return;
|
||||
}
|
||||
int item_index = item_at_event_position(event.position());
|
||||
auto index = model()->index(item_index, m_model_column);
|
||||
if ((selection().size() > 1) & m_might_drag) {
|
||||
selection().set(index);
|
||||
m_might_drag = false;
|
||||
if (item_index >= 0) {
|
||||
auto index = model()->index(item_index, m_model_column);
|
||||
if ((selection().size() > 1) & m_might_drag) {
|
||||
selection().set(index);
|
||||
m_might_drag = false;
|
||||
}
|
||||
}
|
||||
GAbstractView::mouseup_event(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue