From a6132b67fde462a5c9b15461420c0c4a6582bb3f Mon Sep 17 00:00:00 2001 From: Rafael Fernández López Date: Tue, 26 Jun 2007 19:52:45 +0000 Subject: Improve behavior when changes are detected on the model. svn path=/trunk/KDE/kdebase/apps/; revision=680643 --- src/klistview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/klistview.cpp') diff --git a/src/klistview.cpp b/src/klistview.cpp index 1971d7f98..e6ffdc1e0 100644 --- a/src/klistview.cpp +++ b/src/klistview.cpp @@ -948,6 +948,7 @@ void KListView::rowsInsertedArtifficial(const QModelIndex &parent, int start, int end) { + d->lastSelection = QItemSelection(); d->elementsInfo.clear(); d->elementsPosition.clear(); d->elementDictionary.clear(); @@ -1052,7 +1053,8 @@ void KListView::rowsRemoved(const QModelIndex &parent, int start, int end) { - if (d->proxyModel) + if ((viewMode() == KListView::IconMode) && d->proxyModel && + d->itemCategorizer) { // Force the view to update all elements rowsInsertedArtifficial(parent, start, end); -- cgit v1.3