Version: (using KDE KDE 3.1.2) Installed from: Debian testing/unstable Packages A tree view rooted at devices:/ won't expand individual devices properly. Instead of nesting subdirectories/files of the device when the user clicks "+", it displays them at the same level as the devices, one level higher than they ought to be. They are mixed in with the proper top-level nodes. These misplaced subnodes are fully functional (expand/open folders, open files). If the user clicks "-" next to the device that he originally expanded, then expands it again, a duplicate set of subnodes will be created at the top level in the same manner as the first, ad infinitum. This is annoying. :) I wanted to create a split profile with a tree view locked at devices on the left and an icon view on the right.
Subject: kdebase/konqueror/listview CVS commit by wgreven: Handle the clear(url) signal which we receive before a redirection correctly. So clear the directory 'url' and don't completely remove it. Fixes the placement of items in the tree. CCMAIL:62672-done@bugs.kde.org M +10 -6 konq_treeviewwidget.cc 1.51 M +1 -0 konq_treeviewwidget.h 1.17 --- kdebase/konqueror/listview/konq_treeviewwidget.cc #1.50:1.51 @@ -102,4 +102,13 @@ void KonqTreeViewWidget::addSubDir( Konq void KonqTreeViewWidget::removeSubDir( const KURL & _url ) { + clearSubDir( _url ); + + m_dictSubDirs.remove( _url.url(-1) ); + m_urlsToOpen.remove( _url.url(-1) ); + m_urlsToReload.remove( _url.url(-1) ); +} + +void KonqTreeViewWidget::clearSubDir( const KURL & _url ) +{ QListViewItem *item = m_dictSubDirs[_url.url(-1)]; if ( item ) @@ -131,10 +140,5 @@ void KonqTreeViewWidget::removeSubDir( c } } - - m_dictSubDirs.remove( _url.url(-1) ); } - - m_urlsToOpen.remove( _url.url(-1) ); - m_urlsToReload.remove( _url.url(-1) ); } @@ -186,5 +190,5 @@ void KonqTreeViewWidget::slotClear( cons // subdirs happens level per level. - removeSubDir( _url ); + clearSubDir( _url ); } --- kdebase/konqueror/listview/konq_treeviewwidget.h #1.16:1.17 @@ -59,4 +59,5 @@ protected: void addSubDir( KonqListViewDir* _dir ); void removeSubDir( const KURL & _url ); + void clearSubDir( const KURL & _url ); void openSubFolder( KonqListViewDir* _dir, bool _reload );