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.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/modlistbypriorityproxy.h') diff --git a/src/modlistbypriorityproxy.h b/src/modlistbypriorityproxy.h index cb50352f..26f60bc7 100644 --- a/src/modlistbypriorityproxy.h +++ b/src/modlistbypriorityproxy.h @@ -44,8 +44,13 @@ public: QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override; QModelIndex mapToSource(const QModelIndex& proxyIndex) const override; + // check the internal state for expanded/collapse items and emit a expandItem + // signal for each of the expanded item, useful to refresh the tree state after + // layout modification + void refreshExpandedItems() const; + signals: - void expandItem(const QModelIndex& index); + void expandItem(const QModelIndex& index) const; public slots: @@ -56,7 +61,7 @@ public slots: private: void buildTree(); - void expandItems(const QModelIndex& index); + void expandItems(const QModelIndex& index) const; struct TreeItem { ModInfo::Ptr mod; -- cgit v1.3.1