Review Request 117603: Do not change the selection when re-sorting the view
Christoph Feck
christoph at maxiom.de
Mon Apr 21 15:28:59 BST 2014
> On April 21, 2014, 2:26 p.m., Christoph Feck wrote:
> > Could this also affect bug 332792?
Ignore everything I wrote, it's already fixed :P Forgot to track the bug title change...
- Christoph
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117603/#review56120
-----------------------------------------------------------
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/20140421/d09c6903/attachment.htm>
More information about the kfm-devel
mailing list