DevHeads.net

Review Request: Keeps the selection after showing/hiding hidden files.

Review request for KDE Base Apps, Peter Penz and Frank Reininghaus.

Summary
Still only files that are shown will be selected, thus selecting hidden files and then hiding hidden files will deselect those.

This addresses bug 177215.
<a href="http://bugs.kde.org/show_bug.cgi?id=177215" title="http://bugs.kde.org/show_bug.cgi?id=177215">http://bugs.kde.org/show_bug.cgi?id=177215</a>

Diffs
dolphin/src/views/dolphinview.cpp 4bc901b

Diff: <a href="http://git.reviewboard.kde.org/r/101487/diff" title="http://git.reviewboard.kde.org/r/101487/diff">http://git.reviewboard.kde.org/r/101487/diff</a>

Testing

Thanks,

Matthias

Comments

Re: Review Request: Keeps the selection after showing/hiding hid

By Commit Hook at 06/01/2011 - 18:01

This review has been submitted with commit 154e601205d0137b02db45b9f18d8a4f1fdfec35 by Matthias Fuchs.

- Commit

On June 1, 2011, 9:58 p.m., Matthias Fuchs wrote:

Re: Review Request: Keeps the selection after showing/hiding hid

By Commit Hook at 06/01/2011 - 18:00

This review has been submitted with commit 7993626ee89a7924d55d0c6f8455438459f1de88 by Matthias Fuchs.

- Commit

On June 1, 2011, 9:58 p.m., Matthias Fuchs wrote:

Re: Review Request: Keeps the selection after showing/hiding hid

By Peter Penz at 06/01/2011 - 17:48

Thanks for the patch. I just had a look and if I don't miss anything it should
be sufficient to just add the line:
m_selectedItems = selectedItems();
to DolphinView::setShowHiddenFiles().

I'm not really happy with how the selections are remembered in DolphinView in
general: We have m_selectedItems to remember the selection when e.g. changing
views and there is m_newFileNames for the usecase where the KFileItems are not
available yet and only the new names are known.

I'm currently working on a (let's say) "new view-engine" in Dolphin for 4.8
that should allow us to get rid of at least m_selectedItems but for 4.7 it
would be great if we could get in this fix.

Would it be possible that you check whether 'm_selectedItems =
selectedItems();' is sufficient? I'm quite sure this should work but probably
I'm missing something... Thanks :-)

- Peter

On June 1, 2011, 9:58 p.m., Matthias Fuchs wrote:

Re: Review Request: Keeps the selection after showing/hiding hid

By Matthias Fuchs at 06/01/2011 - 17:56

Indeed that works too and is a lot (!) nicer. :)

Yeah the m_newFileNames is not really nice and can't handle multiple corner cases like kio operations that were paused in between e.g. because of existing files etc.

- Matthias

On June 1, 2011, 9:58 p.m., Matthias Fuchs wrote: