diff options
| author | Peter Penz <[email protected]> | 2007-09-25 05:59:27 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-25 05:59:27 +0000 |
| commit | 6fd52b51ac3bd97483988df222da35f53dfc0305 (patch) | |
| tree | d4a121c200144e4b1d799fd8c84cebf52daa077f /src | |
| parent | 48c0de3483fac6abe3e7c195e44c6114a2635e38 (diff) | |
assure that the restoring the column view cannot fail and replace the temporary 'if (...)-fix' by a Q_ASSERT again
svn path=/trunk/KDE/kdebase/apps/; revision=716711
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinview.cpp | 21 | ||||
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 1 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 69d7706d3..9541f5abb 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -420,23 +420,20 @@ void DolphinView::setUrl(const KUrl& url) return; } + const bool restoreColumnView = !isColumnViewActive() + && !m_rootUrl.isEmpty() + && m_rootUrl.isParentOf(url) + && (m_rootUrl != url); + const KUrl oldRootUrl = rootUrl(); m_controller->setUrl(url); // emits urlChanged, which we forward - bool useUrlProperties = true; - const bool restoreColumnView = !isColumnViewActive() - && m_rootUrl.isParentOf(url) - && (m_rootUrl != url); if (restoreColumnView) { applyViewProperties(m_rootUrl); - if (itemView() == m_columnView) { - startDirLister(m_rootUrl); - m_columnView->showColumn(url); - useUrlProperties = false; - } - } - - if (useUrlProperties) { + Q_ASSERT(itemView() == m_columnView); + startDirLister(m_rootUrl); + m_columnView->showColumn(url); + } else { applyViewProperties(url); startDirLister(url); } diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 9a358b2ff..d54ec1e93 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -506,6 +506,7 @@ void DolphinViewContainer::slotItemTriggered(const KFileItem& item) KUrl url = item.mostLocalUrl(isLocal); if (item.isDir()) { + m_view->setRootUrl(KUrl()); // the root URL is unknown m_view->setUrl(url); } else if (item.isFile()) { // allow to browse through ZIP and tar files |
