mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 14:15:08 +00:00
LibGUI: Fix assertion failure in GItemView::mouse_up()
This commit is contained in:
parent
d2e49719c4
commit
75c5e9af56
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
Add a link
Reference in a new issue