summaryrefslogtreecommitdiff
path: root/src/modlistbypriorityproxy.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-29 13:27:29 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:16 +0100
commitf923de39e071b48bc1437fa4c79c22b3bc9b0583 (patch)
treed92bace851cb6198e5f5e6b48bf5249e234705cb /src/modlistbypriorityproxy.cpp
parent25d852f07564883f5a225eb0e00e883cae30cbd2 (diff)
Maintain selection while filtering.
Diffstat (limited to 'src/modlistbypriorityproxy.cpp')
-rw-r--r--src/modlistbypriorityproxy.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modlistbypriorityproxy.cpp b/src/modlistbypriorityproxy.cpp
index 756d3bcf..86664213 100644
--- a/src/modlistbypriorityproxy.cpp
+++ b/src/modlistbypriorityproxy.cpp
@@ -82,7 +82,7 @@ void ModListByPriorityProxy::buildTree()
expandItems(QModelIndex());
}
-void ModListByPriorityProxy::expandItems(const QModelIndex& index)
+void ModListByPriorityProxy::expandItems(const QModelIndex& index) const
{
for (int row = 0; row < rowCount(index); row++) {
QModelIndex idx = this->index(row, 0, index);
@@ -298,6 +298,11 @@ void ModListByPriorityProxy::onDropEnter(const QMimeData*, ModListView::DropPosi
m_DropPosition = dropPosition;
}
+void ModListByPriorityProxy::refreshExpandedItems() const
+{
+ expandItems(QModelIndex());
+}
+
void ModListByPriorityProxy::expanded(const QModelIndex& index)
{
auto it = m_CollapsedItems.find(index.data(Qt::DisplayRole).toString());