┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-05-20 21:21:48 +0000
committerPeter Penz <[email protected]>2008-05-20 21:21:48 +0000
commited5b2e54736b04d551eae01d976038fb7d5aac35 (patch)
tree94bee37d963ce85a62b8000ae0bdbb8aaa7b0973 /src/dolphinview.cpp
parent0ce69374d96e2b16526b5450d5cc4676bac8b720 (diff)
when going back in history apply the keyboard focus to the the previously shown directory
BUG: 156550 BUG: 158590 svn path=/trunk/KDE/kdebase/apps/; revision=810493
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 2618dea27..f0a4487c9 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -347,6 +347,20 @@ QPoint DolphinView::contentsPosition() const
return QPoint(x, y);
}
+void DolphinView::setCurrentItem(const KUrl& url)
+{
+ const QModelIndex dirIndex = m_dolphinModel->indexForUrl(url);
+ if (dirIndex.isValid()) {
+ const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
+ QAbstractItemView* view = itemView();
+ const bool clearSelection = !hasSelection();
+ view->setCurrentIndex(proxyIndex);
+ if (clearSelection) {
+ view->clearSelection();
+ }
+ }
+}
+
void DolphinView::zoomIn()
{
m_controller->triggerZoomIn();