Keeps the selection after showing/hiding hidden files.

Review Request #101487 - Created June 1, 2011 and submitted

Matthias Fuchs
freininghaus, ppenz
Still only files that are shown will be selected, thus selecting hidden files and then hiding hidden files will deselect those.

Peter Penz
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 :-)
  1. 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.
Commit Hook
This review has been submitted with commit 7993626ee89a7924d55d0c6f8455438459f1de88 by Matthias Fuchs.
Commit Hook
This review has been submitted with commit 154e601205d0137b02db45b9f18d8a4f1fdfec35 by Matthias Fuchs.