diff options
| author | Peter Penz <[email protected]> | 2007-09-24 16:29:03 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-24 16:29:03 +0000 |
| commit | 4a50a536b63d623550de147617511111d89f2ec2 (patch) | |
| tree | 3275144934670cd708c5382067a527158e46eae0 /src/dolphincolumnview.cpp | |
| parent | 4616d291ca5d0e5e985a269db46a7447762c453a (diff) | |
prevent that a column with an invalid root index shows the root column temporary while reloading the columns
svn path=/trunk/KDE/kdebase/apps/; revision=716387
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 9fb3e35a8..38c9cc5c0 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -586,11 +586,15 @@ void DolphinColumnView::showColumn(const KUrl& url) m_columns.append(column); - // Before invoking layoutColumns() the column must be shown. To prevent - // a flickering the initial geometry is set to be invisible. + // Before invoking layoutColumns() the column must be set visible temporary. + // To prevent a flickering the initial geometry is set to a hidden position. column->setGeometry(QRect(-1, -1, 1, 1)); column->show(); layoutColumns(); + + // the layout is finished, now let the column be invisible until it + // gets a valid root index due to expandToActiveUrl() + column->hide(); } } @@ -761,7 +765,9 @@ void DolphinColumnView::reloadColumns() for (int i = 0; i <= end; ++i) { ColumnWidget* nextColumn = m_columns[i + 1]; const QModelIndex rootIndex = nextColumn->rootIndex(); - if (!rootIndex.isValid()) { + if (rootIndex.isValid()) { + nextColumn->show(); + } else { const QModelIndex dirIndex = m_dolphinModel->indexForUrl(m_columns[i]->childUrl()); const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex); if (proxyIndex.isValid()) { |
