summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/AbstractView.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp
index bc06ba4b2c..952064f467 100644
--- a/Libraries/LibGUI/AbstractView.cpp
+++ b/Libraries/LibGUI/AbstractView.cpp
@@ -60,8 +60,10 @@ void AbstractView::set_model(RefPtr<Model> model)
void AbstractView::did_update_model()
{
- if (!model() || selection().first() != m_edit_index)
- stop_editing();
+ stop_editing();
+ m_edit_index = {};
+ m_hovered_index = {};
+ selection().clear();
}
void AbstractView::did_update_selection()