summaryrefslogtreecommitdiff
path: root/src/modlistbypriorityproxy.h
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.h
parent25d852f07564883f5a225eb0e00e883cae30cbd2 (diff)
Maintain selection while filtering.
Diffstat (limited to 'src/modlistbypriorityproxy.h')
-rw-r--r--src/modlistbypriorityproxy.h9
1 files changed, 7 insertions, 2 deletions
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;