From: Peter Penz Date: Tue, 25 Sep 2007 05:59:27 +0000 (+0000) Subject: assure that the restoring the column view cannot fail and replace the temporary ... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/6fd52b51ac3bd97483988df222da35f53dfc0305 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 --- 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