mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibGUI: Allow AbstractView::set_cursor(ModelIndex(), ...)
This should be a valid way to clear the cursor.
This commit is contained in:
@@ -428,7 +428,7 @@ void AbstractView::set_cursor(ModelIndex index, SelectionUpdate selection_update
|
||||
if (m_cursor_index == index)
|
||||
return;
|
||||
|
||||
if (!model()) {
|
||||
if (!model() || !index.is_valid()) {
|
||||
m_cursor_index = {};
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user