]> cloud.milkyroute.net Git - dolphin.git/commitdiff
temporary fix: prevent crash due to a wrong root URL; TODO: fix the real root cause...
authorPeter Penz <peter.penz19@gmail.com>
Mon, 24 Sep 2007 17:18:53 +0000 (17:18 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 24 Sep 2007 17:18:53 +0000 (17:18 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=716416

src/dolphinview.cpp

index ab413f765e9a60796610f5a8644e83b8514ce4c4..69d7706d335535b87c9ae0cde413dd19a0a0530c 100644 (file)
@@ -423,15 +423,20 @@ void DolphinView::setUrl(const KUrl& 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);
-        startDirLister(m_rootUrl);
-        Q_ASSERT(itemView() == m_columnView);
-        m_columnView->showColumn(url);
-    } else {
+        if (itemView() == m_columnView) {
+            startDirLister(m_rootUrl);
+            m_columnView->showColumn(url);
+            useUrlProperties = false;
+        }
+    }
+
+    if (useUrlProperties) {
         applyViewProperties(url);
         startDirLister(url);
     }