mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-08 18:11:52 +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
Notes:
sideshowbarker
2024-07-19 01:36:13 +09:00
Author: https://github.com/awesomekling
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