diff options
author | Stephen Kelly <steveire@gmail.com> | 2009-12-18 15:13:09 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-18 14:27:46 (GMT) |
commit | 82a35ed3f1dede556e9ab6e30b86997c4a8f0fd1 (patch) | |
tree | 0884676639f94fbe47c8e69e0138c823260ac935 /src/gui | |
parent | 315c09c3873f7c5d8b785443372bf975bae47ee7 (diff) | |
download | Qt-82a35ed3f1dede556e9ab6e30b86997c4a8f0fd1.zip Qt-82a35ed3f1dede556e9ab6e30b86997c4a8f0fd1.tar.gz Qt-82a35ed3f1dede556e9ab6e30b86997c4a8f0fd1.tar.bz2 |
Make the layout{,AboutToBe}Changed signals in the QSortFilterProxyModel match its source.
Merge-request: 2266
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qsortfilterproxymodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index 95d6bc8..646a3a1 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -1198,9 +1198,10 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged() { Q_Q(QSortFilterProxyModel); saved_persistent_indexes.clear(); + emit q->layoutAboutToBeChanged(); if (persistent.indexes.isEmpty()) return; - emit q->layoutAboutToBeChanged(); + saved_persistent_indexes = store_persistent_indexes(); } @@ -1208,7 +1209,8 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged() { Q_Q(QSortFilterProxyModel); if (saved_persistent_indexes.isEmpty()) { - q->invalidate(); + clear_mapping(); + emit q->layoutChanged(); return; } |