diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-29 13:27:29 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:16 +0100 |
| commit | f923de39e071b48bc1437fa4c79c22b3bc9b0583 (patch) | |
| tree | d92bace851cb6198e5f5e6b48bf5249e234705cb /src/modlistbypriorityproxy.cpp | |
| parent | 25d852f07564883f5a225eb0e00e883cae30cbd2 (diff) | |
Maintain selection while filtering.
Diffstat (limited to 'src/modlistbypriorityproxy.cpp')
| -rw-r--r-- | src/modlistbypriorityproxy.cpp | 7 |
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()); |
