┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-01-17 06:46:33 +0000
committerPeter Penz <[email protected]>2011-01-17 06:46:33 +0000
commit4d3e52e92e75195b4852e0899498dd7680c0e667 (patch)
tree59d54a34e70ed579185b8bfce3d94bf2188aa9e3 /src/panels
parentfdcba0c01e460d8f18567689e204f31ff2a61005 (diff)
Don't assure the visibility of the leaf, if another directory has been opened by the [+]-toggle.
CCBUG: 263344 svn path=/trunk/KDE/kdebase/apps/; revision=1214979
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/folders/folderspanel.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp
index 1913a85d3..5cfce59e2 100644
--- a/src/panels/folders/folderspanel.cpp
+++ b/src/panels/folders/folderspanel.cpp
@@ -263,14 +263,6 @@ void FoldersPanel::updateMouseButtons()
void FoldersPanel::slotDirListerCompleted()
{
m_treeView->resizeColumnToContents(DolphinModel::Name);
-
- if (m_setLeafVisible) {
- // Invoke scrollToLeaf() asynchronously. This assures that
- // the horizontal scrollbar is shown after resizing the column
- // (otherwise the scrollbar might hide the leaf).
- QTimer::singleShot(0, this, SLOT(scrollToLeaf()));
- m_setLeafVisible = false;
- }
}
void FoldersPanel::slotHorizontalScrollBarMoved(int value)
@@ -315,9 +307,18 @@ void FoldersPanel::selectLeafDirectory()
{
const QModelIndex dirIndex = m_dolphinModel->indexForUrl(m_leafDir);
const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
+
if (proxyIndex.isValid()) {
QItemSelectionModel* selModel = m_treeView->selectionModel();
selModel->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect);
+
+ if (m_setLeafVisible) {
+ // Invoke scrollToLeaf() asynchronously. This assures that
+ // the horizontal scrollbar is shown after resizing the column
+ // (otherwise the scrollbar might hide the leaf).
+ QTimer::singleShot(0, this, SLOT(scrollToLeaf()));
+ m_setLeafVisible = false;
+ }
}
}