From 30cb4c1ef254b10f7f42ece4d8be01eec775294b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 19 Jun 2008 22:43:10 +0000 Subject: [PATCH] Assure that the keyboard focus stays inside the view when replacing the view implementation, otherwise when having a split view the other view gets the focus and will activate itself. BUG: 164468 svn path=/trunk/KDE/kdebase/apps/; revision=822367 --- src/dolphinview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 7ffcbced5..0b04d0afa 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -1143,6 +1143,12 @@ void DolphinView::deleteView() { QAbstractItemView* view = itemView(); if (view != 0) { + // 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()). + setFocus(); + m_topLayout->removeWidget(view); view->close(); view->deleteLater(); -- 2.47.3