From: Peter Penz Date: Tue, 25 Sep 2007 14:56:34 +0000 (+0000) Subject: don't expand to the active URL synchronously, wait until the directory lister has... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/93f8093b661d6cd8db6dd747fbdfe38ebd38294b don't expand to the active URL synchronously, wait until the directory lister has completed its loading svn path=/trunk/KDE/kdebase/apps/; revision=716899 --- diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 6df71cc1e..a85e0198a 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -635,7 +635,9 @@ void DolphinColumnView::showColumn(const KUrl& url) m_index = columnIndex; activeColumn()->setActive(true); - expandToActiveUrl(); + connect(dirLister, SIGNAL(completed()), + this, SLOT(expandToActiveUrl())); + dirLister->openUrl(rootUrl, false, true); } void DolphinColumnView::selectAll() @@ -778,6 +780,9 @@ void DolphinColumnView::updateDecorationSize() void DolphinColumnView::expandToActiveUrl() { + disconnect(m_dolphinModel->dirLister(), SIGNAL(completed()), + this, SLOT(expandToActiveUrl())); + const int lastIndex = m_columns.count() - 1; Q_ASSERT(lastIndex >= 0); const KUrl& activeUrl = m_columns[lastIndex]->url(); @@ -803,9 +808,6 @@ void DolphinColumnView::reloadColumns() for (int i = 0; i <= end; ++i) { ColumnWidget* nextColumn = m_columns[i + 1]; - KDirLister* dirLister = m_dolphinModel->dirLister(); - dirLister->updateDirectory(nextColumn->url()); - const QModelIndex rootIndex = nextColumn->rootIndex(); if (rootIndex.isValid()) { nextColumn->show();