Review Request 117603: Do not change the selection when re-sorting the view

Commit Hook null at kde.org
Sat Apr 26 11:41:35 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117603/#review56607
-----------------------------------------------------------


This review has been submitted with commit a637e4979f109dde4165274a72384bfcb2ff5bc3 by Frank Reininghaus to branch KDE/4.13.

- Commit Hook


On April 16, 2014, 8:51 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117603/
> -----------------------------------------------------------
> 
> (Updated April 16, 2014, 8:51 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Bugs: 333457
>     http://bugs.kde.org/show_bug.cgi?id=333457
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> The user can select a range of items in the view by holding the Shift key and then pressing the arrow keys, or by shift-clicking an item. In that case, we keep track not only of the "current item", which is underlined in the view, but also the "anchor item", which is the item where the selection was started. The entire range between those two items is selected then.
> 
> If the order of the items changes, e.g., because the user switches from "Sort by Name" to "Sort by Date", then both the current and the "anchor" index are updated. However, the items between those two are not necessarily the items that were between them before the re-sorting, i.e., the selected items might change, which is unexpected, of course.
> 
> This can be fixed by finishing the "anchored selection" if the items are resorted.
> 
> A new anchored selection is then started, where the current item is the new anchor item. Without this detail, re-sorting and then pressing Shift+Arrow would not select any items. This is also why I added the new unit test, which verifies that this still works.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kitemlistselectionmanager.cpp ebff1a3 
>   dolphin/src/tests/kitemlistselectionmanagertest.cpp af2610d 
> 
> Diff: https://git.reviewboard.kde.org/r/117603/diff/
> 
> 
> Testing
> -------
> 
> Fixes the bug for me. Old and new unit tests pass.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140426/142135ff/attachment.htm>


More information about the kfm-devel mailing list