summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-03-24 13:43:21 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-03-24 13:47:16 (GMT)
commitdd7b1f11fa4b682d4283274d1fcba8a801fa10f1 (patch)
tree8f0ba802b1cbb308e57c8a6bc23f7dad06243c0b /src/gui/itemviews
parent680bed3dfd50ee888874b5d322899243e0143ff6 (diff)
downloadQt-dd7b1f11fa4b682d4283274d1fcba8a801fa10f1.zip
Qt-dd7b1f11fa4b682d4283274d1fcba8a801fa10f1.tar.gz
Qt-dd7b1f11fa4b682d4283274d1fcba8a801fa10f1.tar.bz2
Make sure the sorting is updated when dynamic sorting is enabled and the model is reset
Task-number: 248868 (part 2) Reviewed-by: Thierry
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index b6fb598..10bcb9a 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -1103,6 +1103,8 @@ void QSortFilterProxyModelPrivate::_q_sourceReset()
// All internal structures are deleted in clear()
q->reset();
update_source_sort_column();
+ if (dynamic_sortfilter)
+ sort();
}
void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged()
@@ -1495,6 +1497,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
d->clear_mapping();
reset();
+ d->update_source_sort_column();
}
/*!
@@ -2107,6 +2110,8 @@ void QSortFilterProxyModel::setDynamicSortFilter(bool enable)
{
Q_D(QSortFilterProxyModel);
d->dynamic_sortfilter = enable;
+ if (enable)
+ d->sort();
}
/*!