diff options
| author | Peter Penz <[email protected]> | 2007-09-21 18:52:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-21 18:52:46 +0000 |
| commit | d24597def8cee35fa230ebd9457e4bea89374d02 (patch) | |
| tree | 862ca570680dbaf2b0b493c21048a453e7b4c797 /src/dolphinview.cpp | |
| parent | 18cc252f7cff0a96cbba8f97772dba9d8ddd0b77 (diff) | |
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
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
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); } } |
