summaryrefslogtreecommitdiff
path: root/src/qtgroupingproxy.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-04 19:37:20 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-04 19:37:20 +0100
commitb242394c0f9c24ca8f9bbced44076abbcd274fee (patch)
treeaf51b9c5b4fe0668d996c4d8f15298fa255a1a89 /src/qtgroupingproxy.cpp
parent85cd33715723f294abeeb8a0f3f77c0de27f6a37 (diff)
Keep track of expanded items in the view instead of the models.
Diffstat (limited to 'src/qtgroupingproxy.cpp')
-rw-r--r--src/qtgroupingproxy.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/qtgroupingproxy.cpp b/src/qtgroupingproxy.cpp
index 3daa66ba..a8c7ce1d 100644
--- a/src/qtgroupingproxy.cpp
+++ b/src/qtgroupingproxy.cpp
@@ -213,19 +213,6 @@ QtGroupingProxy::buildTree()
}
endResetModel();
-
- // restore expand-state
- refreshExpandedItems();
-}
-
-void QtGroupingProxy::refreshExpandedItems() const
-{
- for (int row = 0; row < rowCount(); row++) {
- QModelIndex idx = index(row, 0, QModelIndex());
- if (m_expandedItems.contains(idx.data(Qt::UserRole).toString())) {
- emit expandItem(idx);
- }
- }
}
QList<int>
@@ -1049,14 +1036,3 @@ QtGroupingProxy::dumpGroups() const
log::debug("{}", s);
}
-
-
-void QtGroupingProxy::expanded(const QModelIndex &index)
-{
- m_expandedItems.insert(index.data(Qt::UserRole).toString());
-}
-
-void QtGroupingProxy::collapsed(const QModelIndex &index)
-{
- m_expandedItems.remove(index.data(Qt::UserRole).toString());
-}