From 8f043b2958477d3fe2ef094b7e42f792f4cf0b02 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Fri, 15 Dec 2023 13:07:12 +0000 Subject: Resort directory size count after refreshing After refreshing the view when size count is selected as the sortRole, count is 0 at first. When the actual count is loaded, the sorting is done according to the count being 0. This can break the sort order and cause view and model to be out of sync. Making sure we always resort all items when the directory size/item count is changed fixes this BUG:473999 --- src/kitemviews/kfileitemmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kitemviews/kfileitemmodel.h') diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 3c2721d8f..f87d2d543 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -205,6 +205,8 @@ public: /** set to true to hide application/x-trash files */ void setShowTrashMime(bool show); + void scheduleResortAllItems(); + Q_SIGNALS: /** * Is emitted if the loading of a directory has been started. It is -- cgit v1.3