]> cloud.milkyroute.net Git - dolphin.git/commitdiff
provide temporary (?) fix for a crash that occurs if the categorization is turned...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 19 Jun 2007 17:23:14 +0000 (17:23 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 19 Jun 2007 17:23:14 +0000 (17:23 +0000)
CCMAIL: ereslibre@gmail.com

svn path=/trunk/KDE/kdebase/apps/; revision=677667

src/klistview.cpp

index 9be5dadd8c249ebcd09d6227295dc4aecdd2d98b..15c8b576ad73b99f7e17d3184a6d68791a02d479 100644 (file)
@@ -956,11 +956,11 @@ void KListView::updateGeometries()
 
 void KListView::slotSortingRoleChanged()
 {
-    if (d->proxyModel)
+    if ((viewMode() != KListView::ListMode) && d->proxyModel &&
+        d->itemCategorizer)
     {
         // Force the view to update all elements
-        rowsInsertedArtifficial(QModelIndex(), 0, d->proxyModel->rowCount() -
-                                                                             1);
+        rowsInsertedArtifficial(QModelIndex(), 0, d->proxyModel->rowCount() - 1);
     }
 }