diff options
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); |
