diff options
| author | Peter Penz <[email protected]> | 2011-01-01 17:54:23 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-01-01 17:54:23 +0000 |
| commit | 79a7412107551cdb175d3399561478b9434a2766 (patch) | |
| tree | 9cf0f94602941bdc0054f56877f2189504da5802 /src/views/dolphinview.cpp | |
| parent | a5c75b52fea0ab73692df4a8f8a4437e80774b0c (diff) | |
Forward port: Don't grab the focus if the view did not have the focus already.
CCBUG: 261147
FIXED-IN: 4.6.0
svn path=/trunk/KDE/kdebase/apps/; revision=1210659
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 1e97d6864..b02f794b3 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1231,12 +1231,14 @@ void DolphinView::deleteView() if (view != 0) { disconnectViewAccessor(); - // It's important to set the keyboard focus to the parent - // before deleting the view: Otherwise when having a split - // view the other view will get the focus and will request - // an activation (see DolphinView::eventFilter()). - setFocusProxy(0); - setFocus(); + if (hasFocus()) { + // It's important to set the keyboard focus to the parent + // before deleting the view: Otherwise when having a split + // view the other view will get the focus and will request + // an activation (see DolphinView::eventFilter()). + setFocusProxy(0); + setFocus(); + } m_viewModeController->disconnect(view); |
