diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 04e3c8ca7..e3b61d475 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1484,9 +1484,9 @@ int KFileItemModel::expansionLevelsCompare(const ItemData* a, const ItemData* b) const QString subPathB = subPath(b->item, pathB, index, &isDirB); if (isDirA && !isDirB) { - return -1; + return (sortOrder() == Qt::AscendingOrder) ? -1 : +1; } else if (!isDirA && isDirB) { - return +1; + return (sortOrder() == Qt::AscendingOrder) ? +1 : -1; } // Compare the items of the parents that represent the first |
