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();