]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Assure that the keyboard focus stays inside the view when replacing the view implemen...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 19 Jun 2008 22:43:10 +0000 (22:43 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 19 Jun 2008 22:43:10 +0000 (22:43 +0000)
BUG: 164468

svn path=/trunk/KDE/kdebase/apps/; revision=822367

src/dolphinview.cpp

index 7ffcbced5704592ec1daceae4e13d564e7665ec7..0b04d0afad8eb1be1cf1612bb75503c9ef34abbb 100644 (file)
@@ -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();