From d8b7cd940fbd2d8329593e72c06719f09d0cdabd Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Thu, 12 Dec 2019 11:07:53 -0500 Subject: [PATCH] TreeView: Clear metadata after model update When the filesystem model is updated, it is rebuilt. This means dangling indexes inside the TreeView metadata table will have old information and random directories will toggle open. Clearing the table alleviates this issue. --- Libraries/LibGUI/GTreeView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibGUI/GTreeView.cpp b/Libraries/LibGUI/GTreeView.cpp index a73b02f9e2..cd12d3f71f 100644 --- a/Libraries/LibGUI/GTreeView.cpp +++ b/Libraries/LibGUI/GTreeView.cpp @@ -250,6 +250,7 @@ void GTreeView::scroll_into_view(const GModelIndex& a_index, Orientation orienta void GTreeView::did_update_model() { + m_view_metadata.clear(); GAbstractView::did_update_model(); update_content_size(); update();