forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user