From 0675ece793029ae3b864699e6e0d910d223993c5 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 23 Jan 2020 17:47:16 +0100 Subject: [PATCH] Core: Set FindToolBar's prev/next buttons disabled on document close If the current document closes, all items of the find toolbar (except "Advanced...") are supposed to be disabled. The previous and next buttons however remained enabled, which is now fixed with this change. Change-Id: I33f978f23970280f04fb4f6237b733d5109043c1 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/find/findtoolbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp index caedd37e95a..2db0ff5d34a 100644 --- a/src/plugins/coreplugin/find/findtoolbar.cpp +++ b/src/plugins/coreplugin/find/findtoolbar.cpp @@ -421,7 +421,9 @@ void FindToolBar::updateToolBar() m_ui.findLabel->setVisible(showAllControls); m_ui.findEdit->setEnabled(enabled); m_ui.findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for...")); + m_ui.findPreviousButton->setEnabled(enabled); m_ui.findPreviousButton->setVisible(showAllControls); + m_ui.findNextButton->setEnabled(enabled); m_ui.findNextButton->setVisible(showAllControls); m_ui.horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0, QSizePolicy::Expanding, QSizePolicy::Ignored);