Bug 161323 - Select folder dialog collapse directories selecting "show/hide hidden files"
Summary: Select folder dialog collapse directories selecting "show/hide hidden files"
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 179033 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-27 12:58 UTC by FiNeX
Modified: 2009-05-26 00:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FiNeX 2008-04-27 12:58:23 UTC
Version:           Revision 800924 (using Devel)
Installed from:    Compiled sources

The show/hide hidden files action added on bug #159702 should be improved: when the action (show or hide) is called, all folders are collapsed. For example if you've your home directory expanded and you choose to view the hidden folders, the directory tree will be collapsed and you've to manually go back to the previously selected folder.
Comment 1 FiNeX 2008-12-29 11:30:10 UTC
*** Bug 179033 has been marked as a duplicate of this bug. ***
Comment 2 FiNeX 2008-12-29 11:31:07 UTC
Is this a "kio/file" problem (like it was bug #179033) or is a kdelibs related problem?
Comment 3 Dario Andres 2009-05-25 23:03:06 UTC
Some analysis:

KDirSelectDialog uses a KFileTreeView object to show the directory tree.
When toggling the "show hidden files" action, it calls "void KFileTreeView::setShowHiddenFiles(bool enabled)" which reloads the tree (as it is needed to update the file list and display/hide the hidden files). However it doesn't jump back to the previous selected location.

This could be fixed on KFileTreeView or in KDirSelectDialog.

Doing it inside KFileTreeView will produce a smaller patch, however I don't know if any other application needs the behaviour described in this bug report, so we should fix the bug in KDirSelectDialog instead...
(however, it makes sense to "preserve" the currently selected dir in ALL the cases...)
Comment 4 Dario Andres 2009-05-25 23:46:16 UTC
SVN commit 972880 by darioandres:

When the user chooses to toggle the "Show Hidden Files" states, the treeview is reload
but the current selection is missing. This patch re-selects the previous selected URL

BUG: 161323



 M  +2 -0      kfiletreeview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=972880
Comment 5 Dario Andres 2009-05-25 23:51:23 UTC
SVN commit 972882 by darioandres:

Backport to 4.2branch of:

SVN commit 972880 by darioandres:

When the user chooses to toggle the "Show Hidden Files" states, the treeview is
reload
but the current selection is missing. This patch re-selects the previous
selected URL

CCBUG: 161323



 M  +2 -0      kfiletreeview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=972882
Comment 6 FiNeX 2009-05-26 00:12:44 UTC
many thanks :)