]> cloud.milkyroute.net Git - dolphin.git/commitdiff
don't delete inactive columns when reloading the column-view
authorPeter Penz <peter.penz19@gmail.com>
Mon, 24 Sep 2007 06:55:50 +0000 (06:55 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 24 Sep 2007 06:55:50 +0000 (06:55 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=716190

src/dolphincolumnview.cpp

index 154adeacae0cf2d8e03fca34bfb3b489575a99ed..9f7eddefb7046a2858c04f9b55c436c9ab9065fd 100644 (file)
@@ -471,8 +471,6 @@ void DolphinColumnView::setModel(QAbstractItemModel* model)
 
 void DolphinColumnView::reload()
 {
-    deleteInactiveChildColumns();
-
     // Due to the reloading of the model all columns will be reset to show
     // the same content as the first column. As this is not wanted, all columns
     // except of the first column are temporary hidden until the root index can
@@ -706,7 +704,9 @@ void DolphinColumnView::updateDecorationSize()
 
 void DolphinColumnView::expandToActiveUrl()
 {
-    const KUrl& activeUrl = m_controller->url();
+    const int lastIndex = m_columns.count() - 1;
+    Q_ASSERT(lastIndex >= 0);
+    const KUrl& activeUrl = m_columns[lastIndex]->url();
     const KUrl baseUrl = m_dolphinModel->dirLister()->url();
     if (baseUrl.isParentOf(activeUrl) && (baseUrl != activeUrl)) {
         m_dolphinModel->expandToUrl(activeUrl);