mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibGUI: Allow AbstractView::set_cursor(ModelIndex(), ...)
This should be a valid way to clear the cursor.
This commit is contained in:
parent
64e448eef0
commit
734035857e
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ void AbstractView::set_cursor(ModelIndex index, SelectionUpdate selection_update
|
||||||
if (m_cursor_index == index)
|
if (m_cursor_index == index)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!model()) {
|
if (!model() || !index.is_valid()) {
|
||||||
m_cursor_index = {};
|
m_cursor_index = {};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue