summaryrefslogtreecommitdiff
path: root/src/datatab.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/datatab.cpp
parent2b0a720863a26faebdc240f4db29dd39c7a035b6 (diff)
just disable recursive filtering when fully loading
switching models clears persistent indexes and collapses everything
Diffstat (limited to 'src/datatab.cpp')
-rw-r--r--src/datatab.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/datatab.cpp b/src/datatab.cpp
index d8ce9c3a..f263c2c6 100644
--- a/src/datatab.cpp
+++ b/src/datatab.cpp
@@ -37,7 +37,7 @@ DataTab::DataTab(
connect(
&m_filter, &FilterWidget::aboutToChange,
- [&]{ m_filetree->ensureFullyLoaded(); });
+ [&]{ ensureFullyLoaded(); });
connect(
ui.refresh, &QPushButton::clicked,
@@ -107,7 +107,7 @@ void DataTab::updateTree()
m_filetree->refresh();
if (!m_filter.empty()) {
- m_filetree->ensureFullyLoaded();
+ ensureFullyLoaded();
if (auto* m=m_filter.proxyModel()) {
m->invalidate();
@@ -115,6 +115,15 @@ void DataTab::updateTree()
}
}
+void DataTab::ensureFullyLoaded()
+{
+ if (!m_filetree->fullyLoaded()) {
+ m_filter.proxyModel()->setRecursiveFilteringEnabled(false);
+ m_filetree->ensureFullyLoaded();
+ m_filter.proxyModel()->setRecursiveFilteringEnabled(true);
+ }
+}
+
void DataTab::onConflicts()
{
updateOptions();