X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/e92bbbe27ca39a1329ae3f2d6ecae128dd71855b..85e0112c3d17df526093d9ccabaea2a31d3e172a:/src/klistview.cpp diff --git a/src/klistview.cpp b/src/klistview.cpp index 1cba47b1b..15c8b576a 100644 --- a/src/klistview.cpp +++ b/src/klistview.cpp @@ -21,7 +21,8 @@ #include "klistview.h" #include "klistview_p.h" -#include // trunc +#include // trunc on C99 compliant systems +#include // trunc for not C99 compliant systems #include #include @@ -955,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); } }