diff options
author | Andreas Kling <kling@serenityos.org> | 2020-10-31 21:23:01 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-01 10:39:37 +0100 |
commit | e499b0f161268ac654d4f288bd9ea3a7d8207c4a (patch) | |
tree | 0bc98d8573eff87d629dc3704b2a37f316ebc053 /Libraries/LibGUI/AbstractView.cpp | |
parent | 90a30f694db94f7e2ac128e68983a0017b87ea39 (diff) | |
download | serenity-e499b0f161268ac654d4f288bd9ea3a7d8207c4a.zip |
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.
Diffstat (limited to 'Libraries/LibGUI/AbstractView.cpp')
-rw-r--r-- | Libraries/LibGUI/AbstractView.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp index e6a169fcb7..e2ed2c9698 100644 --- a/Libraries/LibGUI/AbstractView.cpp +++ b/Libraries/LibGUI/AbstractView.cpp @@ -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 { |