Bug 433207 - Dolphin should not implicitly sort folders first when sorting by actual file/folder sizes instead of folder item counts
Summary: Dolphin should not implicitly sort folders first when sorting by actual file/...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 20.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: usability
: 428161 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-18 23:39 UTC by jbn
Modified: 2021-03-08 19:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jbn 2021-02-18 23:39:50 UTC
SUMMARY
When Dolphin sorts folders by size (instead of item counts) Dolphin switches to sorting folders first even when sorting folders first is not requested.

STEPS TO REPRODUCE
1. Launch Dolphin normally and go to a folder where you have many files and folders of varying sizes.
2. Open Dolphin preferences and switch View Modes/Details/Folder size displays to "Size of contents, up to" and pick some depth level that will certainly contain everything in your folder and all subfolders.
3. Be sure that View->Sort By->Folders First is disabled (unchecked).
4. Switch a Dolphin window to details mode and add the Size column if you're not seeing sizes.
5. Click the Size column to sort the table by size.

OBSERVED RESULT
Dolphin sorts folders first despite being told not to do this in step 3.

EXPECTED RESULT
Dolphin should only sort folders first when View->Sort By->Folders First is enabled.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-3-amd64
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8150 Eight-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NV106

ADDITIONAL INFORMATION
I'm guessing that this (now erroneous) behavior is a holdover from when Dolphin did not sort by actual file/folder sizes but by item counts in folders? Now that Dolphin can sort by file sizes (yay for that feature!) the sort order should not implicitly sort folders first unless requested.
Comment 1 Bug Janitor Service 2021-02-22 07:30:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/184
Comment 2 Méven Car 2021-02-22 07:40:46 UTC
*** Bug 428161 has been marked as a duplicate of this bug. ***
Comment 3 Elvis Angelaccio 2021-03-08 06:04:00 UTC
Git commit ae429d1674891bd57a864690e1ab172351d5f9c3 by Elvis Angelaccio, on behalf of Méven Car.
Committed on 07/03/2021 at 22:45.
Pushed by meven into branch 'master'.

KFileModel: Let Sort dir first affect size sorting

M  +41   -35   src/kitemviews/kfileitemmodel.cpp

https://invent.kde.org/system/dolphin/commit/ae429d1674891bd57a864690e1ab172351d5f9c3