Fix a bug with selecting copying the right text to the Find dialog.

To reproduce:
Split editors.
Select text in first editor.
Select text in second editor.
Invoke the find dialog.
Notice that the text from the first editor was used.

Reviewed-By: mae
(cherry picked from commit fd0fbddebb)
This commit is contained in:
dt
2009-10-21 15:10:27 +02:00
committed by con
parent 2b6a168972
commit 7d1a3d7fe7

View File

@@ -135,6 +135,8 @@ void FindPlugin::openFindFilter()
QAction *action = qobject_cast<QAction*>(sender());
QTC_ASSERT(action, return);
IFindFilter *filter = action->data().value<IFindFilter *>();
if (m_currentDocumentFind->candidateIsEnabled())
m_currentDocumentFind->acceptCandidate();
QString currentFindString = (m_currentDocumentFind->isEnabled() ? m_currentDocumentFind->currentFindString() : "");
if (!currentFindString.isEmpty())
m_findDialog->setFindText(currentFindString);