From b0aee9ccd91b7b09a65fc035d7a3441586bcde92 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Jul 2021 11:34:29 +0200 Subject: [PATCH] Update Find/Replace action even in edge cases The Issues pane has a placeholder for the find tool bar, there is one in the top level layout for all output panes, but it doesn't support searching itself. Make sure that the Find/Replace action is updated even when switching focus from another find tool bar to the issues pane. Fixes: QTCREATORBUG-25991 Change-Id: If96e9a2c59e159408aa881a01a1df0bb7bf28963 Reviewed-by: David Schulz --- src/plugins/coreplugin/find/currentdocumentfind.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/find/currentdocumentfind.cpp b/src/plugins/coreplugin/find/currentdocumentfind.cpp index 7cbe94783f6..7fe84aac158 100644 --- a/src/plugins/coreplugin/find/currentdocumentfind.cpp +++ b/src/plugins/coreplugin/find/currentdocumentfind.cpp @@ -165,8 +165,12 @@ void CurrentDocumentFind::updateCandidateFindFilter(QWidget *old, QWidget *now) if (!impl) candidate = candidate->parentWidget(); } - if (candidate == m_candidateWidget && impl == m_candidateFind) + if (candidate == m_candidateWidget && impl == m_candidateFind) { + // trigger update of action state since a changed focus can still require disabling the + // Find/Replace action + emit changed(); return; + } if (m_candidateWidget) disconnect(Aggregation::Aggregate::parentAggregate(m_candidateWidget), &Aggregation::Aggregate::changed, this, &CurrentDocumentFind::candidateAggregationChanged);