From f62153231be89150b8a8ddea3da2f0828855d22b Mon Sep 17 00:00:00 2001 From: Nidhi Jain Date: Tue, 30 Sep 2014 23:14:10 +0200 Subject: [PATCH] Move focus to view when closing the find bar with the [x] button BUGS: 314251 REVIEW: 120307 FIXED-IN: 4.14.2 --- part.cpp | 1 + ui/findbar.cpp | 1 + ui/findbar.h | 1 + 3 files changed, 3 insertions(+) diff --git a/part.cpp b/part.cpp index d07bed722..218aa0e52 100644 --- a/part.cpp +++ b/part.cpp @@ -473,6 +473,7 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW m_pageNumberTool = new MiniBar( 0, m_miniBarLogic ); connect( m_findBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); + connect( m_findBar, SIGNAL(onCloseButtonPressed()), m_pageView, SLOT(setFocus())); connect( m_miniBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); connect( m_pageView, SIGNAL(escPressed()), m_findBar, SLOT(resetSearch()) ); connect( m_pageNumberTool, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); diff --git a/ui/findbar.cpp b/ui/findbar.cpp index f00f8833b..de7f0a667 100644 --- a/ui/findbar.cpp +++ b/ui/findbar.cpp @@ -179,6 +179,7 @@ void FindBar::closeAndStopSearch() { m_search->lineEdit()->stopSearch(); } + emit onCloseButtonPressed(); close(); } diff --git a/ui/findbar.h b/ui/findbar.h index 4db285572..1166628ea 100644 --- a/ui/findbar.h +++ b/ui/findbar.h @@ -36,6 +36,7 @@ class FindBar signals: void forwardKeyPressEvent( QKeyEvent* ); + void onCloseButtonPressed(); public slots: void findNext();