summaryrefslogtreecommitdiff
path: root/src/filetree.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-02-07 14:02:00 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-02-07 14:02:00 -0500
commitd0c16e60d734fe2f72c387552559bf125554fb2d (patch)
tree10dbef4570b5d69cdb19525d56d5de821b0c9c89 /src/filetree.cpp
parent2b0a720863a26faebdc240f4db29dd39c7a035b6 (diff)
just disable recursive filtering when fully loading
switching models clears persistent indexes and collapses everything
Diffstat (limited to 'src/filetree.cpp')
-rw-r--r--src/filetree.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/filetree.cpp b/src/filetree.cpp
index 937ffe4c..19f2555a 100644
--- a/src/filetree.cpp
+++ b/src/filetree.cpp
@@ -157,30 +157,14 @@ void FileTree::clear()
m_model->clear();
}
-void FileTree::ensureFullyLoaded()
+bool FileTree::fullyLoaded() const
{
- QAbstractProxyModel* proxy = nullptr;
-
- if (m_tree->model() != m_model) {
- // looks like there's a proxy on the tree, disable it
- proxy = dynamic_cast<QAbstractProxyModel*>(m_tree->model());
-
- m_tree->setModel(m_model);
-
- if (proxy) {
- if (proxy->sourceModel() != m_model)
- DebugBreak();
-
- proxy->setSourceModel(nullptr);
- }
- }
+ return m_model->fullyLoaded();
+}
+void FileTree::ensureFullyLoaded()
+{
m_model->ensureFullyLoaded();
-
- if (proxy) {
- proxy->setSourceModel(m_model);
- m_tree->setModel(proxy);
- }
}
FileTreeItem* FileTree::singleSelection()