diff --git a/part.cpp b/part.cpp --- a/part.cpp +++ b/part.cpp @@ -549,6 +549,7 @@ connect( m_findBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); connect( m_findBar, SIGNAL(onCloseButtonPressed()), m_pageView, SLOT(setFocus())); + connect( m_sidebar, SIGNAL(onSideBarCollapsed()), m_pageView, SLOT(setFocus())); connect( m_miniBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); connect( m_pageView.data(), &PageView::escPressed, m_findBar, &FindBar::resetSearch ); connect( m_pageNumberTool, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*))); diff --git a/ui/sidebar.h b/ui/sidebar.h --- a/ui/sidebar.h +++ b/ui/sidebar.h @@ -48,6 +48,7 @@ Q_SIGNALS: void urlsDropped( const QList& urls ); + void onSideBarCollapsed(); protected: void dragEnterEvent( QDragEnterEvent* event ) override; diff --git a/ui/sidebar.cpp b/ui/sidebar.cpp --- a/ui/sidebar.cpp +++ b/ui/sidebar.cpp @@ -725,6 +725,7 @@ { d->list->selectionModel()->clear(); setCollapsed( true ); + emit onSideBarCollapsed(); } else {