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 <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2021-07-12 11:34:29 +02:00
parent ee974ec491
commit b0aee9ccd9

View File

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