summaryrefslogtreecommitdiff
path: root/src/qtgroupingproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qtgroupingproxy.cpp')
-rw-r--r--src/qtgroupingproxy.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qtgroupingproxy.cpp b/src/qtgroupingproxy.cpp
index 4e066f65..3ecb2a72 100644
--- a/src/qtgroupingproxy.cpp
+++ b/src/qtgroupingproxy.cpp
@@ -57,6 +57,7 @@ QtGroupingProxy::QtGroupingProxy(QAbstractItemModel *model, QModelIndex rootNode
connect( sourceModel(), SIGNAL(layoutChanged()), SLOT(buildTree()) );
connect( sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
SLOT(modelDataChanged(QModelIndex,QModelIndex)) );
+ connect( sourceModel(), SIGNAL(modelReset()), this, SLOT(resetModel()) );
if( groupedColumn != -1 )
setGroupedColumn( groupedColumn );
@@ -985,6 +986,12 @@ QtGroupingProxy::modelRowsRemoved( const QModelIndex &parent, int start, int end
}
void
+QtGroupingProxy::resetModel()
+{
+ buildTree();
+}
+
+void
QtGroupingProxy::modelDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight )
{
//TODO: need to look in the groupedColumn and see if it changed and changed grouping accordingly