[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Review Request 117603: Do not change the selection when re-sorting the view
From:       "Christoph Feck" <christoph () maxiom ! de>
Date:       2014-04-21 14:28:59
Message-ID: 20140421142859.3534.88666 () probe ! kde ! org
[Download RAW message or body]

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


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/117603/">https://git.reviewboard.kde.org/r/117603/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 21st, 2014, 2:26 p.m. UTC, <b>Christoph \
Feck</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Could this also affect bug 332792?</pre>  </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ignore everything I \
wrote, it&#39;s already fixed :P Forgot to track the bug title change... </pre>
<br />










<p>- Christoph</p>


<br />
<p>On April 16th, 2014, 8:51 p.m. UTC, Frank Reininghaus wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Dolphin.</div>
<div>By Frank Reininghaus.</div>


<p style="color: grey;"><i>Updated April 16, 2014, 8:51 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=333457">333457</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-baseapps
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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 &quot;current item&quot;, which is underlined in the view, \
but also the &quot;anchor item&quot;, 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 &quot;Sort by \
Name&quot; to &quot;Sort by Date&quot;, then both the current and the \
&quot;anchor&quot; 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 &quot;anchored selection&quot; 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.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Fixes the bug for me. Old and new unit tests pass.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>dolphin/src/kitemviews/kitemlistselectionmanager.cpp <span style="color: \
grey">(ebff1a3)</span></li>

 <li>dolphin/src/tests/kitemlistselectionmanagertest.cpp <span style="color: \
grey">(af2610d)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/117603/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic