Bug 333457 - Contiguous vs. single selection and sorting
Summary: Contiguous vs. single selection and sorting
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 4.12.4
Platform: Kubuntu Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Keywords: reproducible
: 336383 (view as bug list)
Depends on:
Reported: 2014-04-15 10:46 UTC by Holger
Modified: 2014-06-18 11:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.1

expected versus actual result (161.40 KB, image/png)
2014-04-15 10:47 UTC, Holger

Note You need to log in before you can comment on or make changes to this bug.
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

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
REVIEW: 117603
FIXED-IN: 4.13.1

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

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. ***