From: Peter Penz Date: Thu, 19 Jun 2008 22:43:10 +0000 (+0000) Subject: Assure that the keyboard focus stays inside the view when replacing the view implemen... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/30cb4c1ef254b10f7f42ece4d8be01eec775294b?ds=sidebyside 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 --- 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();