From c8a0d51a434898b3f2588cf887a663f821f909e7 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Wed, 29 Apr 2015 02:06:44 +0000 Subject: [PATCH] revert changes that caused FileBrowsers to steal focus when opened --- include/FileBrowser.h | 1 - src/gui/FileBrowser.cpp | 6 ------ src/gui/widgets/SideBar.cpp | 4 ---- 3 files changed, 11 deletions(-) diff --git a/include/FileBrowser.h b/include/FileBrowser.h index 21e8e7aef..b2d1e83bf 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -64,7 +64,6 @@ private slots: private: bool filterItems( QTreeWidgetItem * item, const QString & filter ); virtual void keyPressEvent( QKeyEvent * ke ); - void focusInEvent(QFocusEvent * event); void addItems( const QString & path ); diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index cbcdfc81b..e213d801c 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -268,12 +268,6 @@ void FileBrowser::giveFocusToFilter() } } -void FileBrowser::focusInEvent(QFocusEvent * event) -{ - // when the FileBrowser is opened, direct focus to the filter for quick filtering - giveFocusToFilter(); -} - void FileBrowser::addItems(const QString & path ) { diff --git a/src/gui/widgets/SideBar.cpp b/src/gui/widgets/SideBar.cpp index bdc7254b2..990bae7f6 100644 --- a/src/gui/widgets/SideBar.cpp +++ b/src/gui/widgets/SideBar.cpp @@ -158,10 +158,6 @@ void SideBar::toggleButton( QAbstractButton * button ) activeWidget->setVisible( button->isChecked() ); toolButton->setToolButtonStyle( button->isChecked() ? Qt::ToolButtonTextBesideIcon : Qt::ToolButtonIconOnly ); - if ( button->isChecked() ) - { - activeWidget->setFocus(); - } } }