Core: Disable the "New Search" tool button during visible search panel

The "New Search" tool button has no effect while the search panel is
shown. Let's disable it during that time, and make it behave like the
expand/collapse tool button.

Change-Id: I47b78e1955e10186addf302418d8b9807fd5feae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2019-04-23 19:54:52 +02:00
parent 391c9b77d2
commit 4ebcf52de9

View File

@@ -167,11 +167,13 @@ namespace Internal {
if (focus)
m_widget->currentWidget()->setFocus();
m_expandCollapseAction->setEnabled(false);
m_newSearchButton->setEnabled(false);
} else {
if (focus)
m_searchResultWidgets.at(visibleSearchIndex())->setFocusInternally();
m_searchResultWidgets.at(visibleSearchIndex())->notifyVisibilityChanged(true);
m_expandCollapseAction->setEnabled(true);
m_newSearchButton->setEnabled(true);
}
q->navigateStateChanged();
}