From d24597def8cee35fa230ebd9457e4bea89374d02 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 21 Sep 2007 18:52:46 +0000 Subject: implemented reloading of all columns of the column view (just updating the directory lister is not enough in this case...) svn path=/trunk/KDE/kdebase/apps/; revision=715294 --- src/dolphinview.cpp | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src/dolphinview.cpp') diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 2dd8e289b..d7e79f330 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -505,28 +505,20 @@ void DolphinView::startDirLister(const KUrl& url, bool reload) m_dirLister->stop(); - bool openDir = true; bool keepOldDirs = isColumnViewActive() && !m_initializeColumnView; m_initializeColumnView = false; if (keepOldDirs) { + // keeping old directories is only necessary for hierarchical views + // like the column view if (reload) { - keepOldDirs = false; - - const KUrl& dirListerUrl = m_dirLister->url(); - if (dirListerUrl.isValid()) { - const KUrl::List dirs = m_dirLister->directories(); - KUrl url; - foreach(url, dirs) { - m_dirLister->updateDirectory(url); - } - openDir = false; - } + // for the column view it is not enough to reload the directory lister, + // so this task is delegated to the column view directly + m_columnView->reload(); } else if (m_dirLister->directories().contains(url)) { // The dir lister contains the directory already, so - // KDirLister::openUrl() may not been invoked twice. + // KDirLister::openUrl() may not get invoked twice. m_dirLister->updateDirectory(url); - openDir = false; } else { const KUrl& dirListerUrl = m_dirLister->url(); if ((dirListerUrl == url) || !m_dirLister->url().isParentOf(url)) { @@ -535,11 +527,10 @@ void DolphinView::startDirLister(const KUrl& url, bool reload) // and hence the view must be reset. keepOldDirs = false; } + m_dirLister->openUrl(url, keepOldDirs, false); } - } - - if (openDir) { - m_dirLister->openUrl(url, keepOldDirs, reload); + } else { + m_dirLister->openUrl(url, false, reload); } } -- cgit v1.3