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

List:       kfm-devel
Subject:    Re: Review Request 128563: Preserve selected items when changing folders
From:       Emmanuel Pescosta <emmanuelpescosta099 () gmail ! com>
Date:       2017-02-26 21:07:25
Message-ID: 20170226210725.3284.73601 () mimi ! kde ! org
[Download RAW message or body]

--===============7508522720932474900==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On Jan. 29, 2017, 3:49 p.m., Emmanuel Pescosta wrote:
> > I hope that this is more understandable than my previous attempt.
> 
> Martin Tobias Holmedahl Sandsmark wrote:
> It's a long time since I wrote this patch now so I don't remember all the details. \
> But I went through several iterations before I found something that worked, \
> including most of what you have suggested. I'm fairly sure this is the best \
> solution short of a more major refactoring. 
> Emmanuel Pescosta wrote:
> This RR can now be closed, fixed in [1].
> 
> I have found some problems with your patch (e.g. restore the selection when not all \
> items are available immediately when using sftp or other slow ioslaves).  I did \
> some cleanups [1] and now it's possible to make use of the partial selection \
> restoring of DolphinView::updateViewState without duplicating the code. 
> I have also fixed the anchored selection bug you have mentioned, see [3]. Because \
> of the refactoring this also fixes the same bug when reloading (F5) the current \
> view. 
> [1] https://cgit.kde.org/dolphin.git/commit/?id=8bc6d09c57eb0a976e9b4f9ee002a48664dfe277
>  [2] https://cgit.kde.org/dolphin.git/commit/?id=41b0e4297313b6549f9178c77c30101a42b0525f
>  [3] https://cgit.kde.org/dolphin.git/commit/?id=1d0b6ba65ff625245c40be0c94cf1ed0c780792e
>  
> Martin Tobias Holmedahl Sandsmark wrote:
> Tested git from master, and selection is not preserved when going back or forward \
> in history nor is it possible to select anything (with shift + arrow key) after \
> going back or forward without changing selection. 
> When reloading the selection is preserved, but it isn't possible to change \
> selection with shift + arrow keys.

This is strange. Selection preserving and select with shift+arrow keys works fine \
here.

Tested by:
* Going back and forward (gui, mouse buttons, keyboard shortcuts)
* Closing a tab and reopening it
* Reloading

> When reloading the selection is preserved, but it isn't possible to change \
> selection with shift + arrow keys.

Are you sure that you are using the correct executable? What you describe here sounds \
like the old behavior of reload. If this is really the patched version, then the \
anchored selection must have a bug because the anchored selection is always enabled \
before items are selected (see 1).

Does closing a tab and then reopening it correctly restore the previously selected \
items?

[1] https://cgit.kde.org/dolphin.git/commit/?id=1d0b6ba65ff625245c40be0c94cf1ed0c780792e



- Emmanuel


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


On Dec. 11, 2016, 1:38 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128563/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2016, 1:38 p.m.)
> 
> 
> Review request for Dolphin, David Faure, Elvis Angelaccio, Emmanuel Pescosta, and \
> Sune Vuorela. 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Instead of just clearing the selection when going back and forth in history, it now \
> preserves the selected items. 
> Another bug it fixes is if you enter a folder, go back, and then hold down shift \
> and press an arrow key to try to select something. 
> 
> Diffs
> -----
> 
> src/dolphinviewcontainer.h 62f9110 
> src/dolphinviewcontainer.cpp 1c43fc9 
> src/views/dolphinview.cpp a737dd0 
> 
> Diff: https://git.reviewboard.kde.org/r/128563/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Tobias Holmedahl Sandsmark
> 
> 


--===============7508522720932474900==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 29th, 2017, 3:49 p.m. CET, <b>Emmanuel \
Pescosta</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;">I hope that this is more understandable than my previous attempt.</pre>  \
</blockquote>






 <p>On February 11th, 2017, 5:47 p.m. CET, <b>Martin Tobias Holmedahl Sandsmark</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;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">It's a long time since I wrote this patch now so I don't remember all the \
details. But I went through several iterations before I found something that worked, \
including most of what you have suggested. I'm fairly sure this is the best solution \
short of a more major refactoring.</p></pre>  </blockquote>





 <p>On February 18th, 2017, 10:06 p.m. CET, <b>Emmanuel Pescosta</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;">This RR can now be \
closed, fixed in [1].

I have found some problems with your patch (e.g. restore the selection when not all \
items are available immediately when using sftp or other slow ioslaves).  I did some \
cleanups [1] and now it&#39;s possible to make use of the partial selection restoring \
of DolphinView::updateViewState without duplicating the code.

I have also fixed the anchored selection bug you have mentioned, see [3]. Because of \
the refactoring this also fixes the same bug when reloading (F5) the current view.

[1] https://cgit.kde.org/dolphin.git/commit/?id=8bc6d09c57eb0a976e9b4f9ee002a48664dfe277
 [2] https://cgit.kde.org/dolphin.git/commit/?id=41b0e4297313b6549f9178c77c30101a42b0525f
 [3] https://cgit.kde.org/dolphin.git/commit/?id=1d0b6ba65ff625245c40be0c94cf1ed0c780792e</pre>
  </blockquote>





 <p>On February 26th, 2017, 12:10 p.m. CET, <b>Martin Tobias Holmedahl Sandsmark</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;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Tested git from master, and selection is not preserved when going back or \
forward in history nor is it possible to select anything (with shift + arrow key) \
after going back or forward without changing selection.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">When \
reloading the selection is preserved, but it isn't possible to change selection with \
shift + arrow keys.</p></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;">This is strange. \
Selection preserving and select with shift+arrow keys works fine here.

Tested by:
* Going back and forward (gui, mouse buttons, keyboard shortcuts)
* Closing a tab and reopening it
* Reloading

&gt; When reloading the selection is preserved, but it isn&#39;t possible to change \
selection with shift + arrow keys.

Are you sure that you are using the correct executable? What you describe here sounds \
like the old behavior of reload. If this is really the patched version, then the \
anchored selection must have a bug because the anchored selection is always enabled \
before items are selected (see 1).

Does closing a tab and then reopening it correctly restore the previously selected \
items?

[1] https://cgit.kde.org/dolphin.git/commit/?id=1d0b6ba65ff625245c40be0c94cf1ed0c780792e</pre>
 <br />










<p>- Emmanuel</p>


<br />
<p>On December 11th, 2016, 1:38 p.m. CET, Martin Tobias Holmedahl Sandsmark \
wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Dolphin, David Faure, Elvis Angelaccio, Emmanuel Pescosta, \
and Sune Vuorela.</div> <div>By Martin Tobias Holmedahl Sandsmark.</div>


<p style="color: grey;"><i>Updated Dec. 11, 2016, 1:38 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
dolphin
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Instead of just clearing the selection when going back \
and forth in history, it now preserves the selected items.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Another bug it fixes is if you enter a folder, go back, and then hold down \
shift and press an arrow key to try to select something.</p></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>src/dolphinviewcontainer.h <span style="color: grey">(62f9110)</span></li>

 <li>src/dolphinviewcontainer.cpp <span style="color: grey">(1c43fc9)</span></li>

 <li>src/views/dolphinview.cpp <span style="color: grey">(a737dd0)</span></li>

</ul>

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






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







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


--===============7508522720932474900==--


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

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