Find: Avoid warning

1. open a text editor
2. open find
3. close editor
4. move focus between e.g. project tree and empty editor area

It was trying to highlight all occurrences in the empty editor area.

Change-Id: I59e344f977970290c7fd816951c1bdc150dae783
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Eike Ziller
2014-12-11 11:55:10 +01:00
parent 7e8fb3a9e9
commit c126e7075b
2 changed files with 3 additions and 1 deletions

View File

@@ -365,7 +365,7 @@ void FindToolBar::adaptToCandidate()
updateGlobalActions();
if (findToolBarPlaceHolder() == FindToolBarPlaceHolder::getCurrent()) {
m_currentDocumentFind->acceptCandidate();
if (isVisible())
if (isVisible() && m_currentDocumentFind->isEnabled())
m_currentDocumentFind->highlightAll(getFindText(), effectiveFindFlags());
}
}