Bug 333457

Summary: Contiguous vs. single selection and sorting
Product: [Applications] dolphin Reporter: Holger <private_lock>
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: erike4141
Priority: NOR    
Version: 4.12.4   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.1
Sentry Crash Report:
Attachments: expected versus actual result

Description Holger 2014-04-15 10:46:02 UTC
Create a multi-file selection:
- by dragging a rectangle with the mouse (works as expected)
- by shift-cursor on the keyboard (wrong selection mode)
sort by another column

See screenshot

Reproducible: Always

Steps to Reproduce:
1. sort for size
2. select some files (e.g. all of size 0) using the keyboard shit+cursor method
3. note the number of selected files (4 files of size 0)
3. sort for name
4. observe the change in number of selected files in the status bar
Actual Results:  
right side of screenshot

Expected Results:  
left side of screenshot

Dolphin 4.13.0
Kubuntu 14.04 beta2 64-Bit
Comment 1 Holger 2014-04-15 10:47:23 UTC
Created attachment 86111 [details]
expected versus actual result
Comment 2 Frank Reininghaus 2014-04-16 20:52:36 UTC
Thanks for the bug report! I can confirm the problem. A proposed fix is at

https://git.reviewboard.kde.org/r/117603/
Comment 3 Frank Reininghaus 2014-04-26 10:41:36 UTC
Git commit a637e4979f109dde4165274a72384bfcb2ff5bc3 by Frank Reininghaus.
Committed on 26/04/2014 at 10:29.
Pushed by freininghaus into branch 'KDE/4.13'.

Do not change the selection when re-sorting the view

If a range of items has been selected by Shift-clicking or by pressing
Shift+Arrow, then each of them is added individually to the selection
before the items are re-sorted.

Before this commit, the first and the last item in the range were
moved, and all items between them were selected, even though these were
not necessarily the items which had been selected before the
re-sorting.
REVIEW: 117603
FIXED-IN: 4.13.1

M  +7    -4    dolphin/src/kitemviews/kitemlistselectionmanager.cpp
M  +26   -0    dolphin/src/tests/kitemlistselectionmanagertest.cpp

http://commits.kde.org/kde-baseapps/a637e4979f109dde4165274a72384bfcb2ff5bc3
Comment 4 Holger 2014-04-26 10:52:19 UTC
Thank you!
Comment 5 Frank Reininghaus 2014-06-18 11:01:36 UTC
*** Bug 336383 has been marked as a duplicate of this bug. ***