mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user