From f923de39e071b48bc1437fa4c79c22b3bc9b0583 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 29 Dec 2020 13:27:29 +0100 Subject: Maintain selection while filtering. --- src/modlistbypriorityproxy.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modlistbypriorityproxy.cpp') 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()); -- cgit v1.3.1