瀏覽代碼

LibGUI: Reify children of root when invalidating in FileSystemModel

This ensures that the children of root also get watched
Adam Harald Jørgensen 1 年之前
父節點
當前提交
d1da5b1f0d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Libraries/LibGUI/FileSystemModel.cpp

+ 2 - 0
Userland/Libraries/LibGUI/FileSystemModel.cpp

@@ -400,6 +400,8 @@ void FileSystemModel::invalidate()
         m_root->m_parent_of_root = true;
         m_root->m_parent_of_root = true;
 
 
     m_root->reify_if_needed();
     m_root->reify_if_needed();
+    for (auto const& child : m_root->m_children)
+        child->reify_if_needed();
 
 
     Model::invalidate();
     Model::invalidate();
 }
 }