diff options
| author | Peter Penz <[email protected]> | 2011-01-01 20:18:43 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-01-01 20:18:43 +0000 |
| commit | dfaff684d6d75143e1831b16bb24fde9ffe24862 (patch) | |
| tree | 2f28c12015b1cbdcbc39ac07faac4c731cea108d /src/views/dolphinview.cpp | |
| parent | 91b99e9fd339187f9f2cca3c32c02d93cfe5f474 (diff) | |
Forward-port: Restore keyboard-focus when changing the view-mode
svn path=/trunk/KDE/kdebase/apps/; revision=1210699
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b02f794b3..29f62f735 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -211,6 +211,7 @@ void DolphinView::setMode(Mode mode) // be restored after reloading the directory m_selectedItems = selectedItems(); + const bool hasFocus = m_viewAccessor.itemView()->hasFocus(); deleteView(); const KUrl viewPropsUrl = rootUrl(); @@ -218,6 +219,10 @@ void DolphinView::setMode(Mode mode) props.setViewMode(m_mode); createView(); + if (hasFocus) { + m_viewAccessor.itemView()->setFocus(); + } + // the file item delegate has been recreated, apply the current // additional information manually const KFileItemDelegate::InformationList infoList = props.additionalInfo(); |
