mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:15:08 +00:00
LibGUI: Invalidate view cursor on model update
This is sad (since it would be nice to preserve the cursor+selection) but until we implement persistent model indexes, this at least prevents us from keeping a stale cursor index.
This commit is contained in:
parent
90a30f694d
commit
e499b0f161
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ void AbstractView::did_update_model(unsigned flags)
|
|||
stop_editing();
|
||||
m_edit_index = {};
|
||||
m_hovered_index = {};
|
||||
m_cursor_index = {};
|
||||
if (!model() || (flags & GUI::Model::InvalidateAllIndexes)) {
|
||||
clear_selection();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue