forked from qt-creator/qt-creator
Core: Avoid a temporary MultiTextCursor
Change-Id: Ibe588ab34e754c9f2c6b483ab642c818b19edef7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -449,8 +449,7 @@ void BaseTextFind::defineFindScope()
|
||||
for (const QTextCursor &c : multiCursor) {
|
||||
if (c.hasSelection()) {
|
||||
if (foundSelection || c.block() != c.document()->findBlock(c.anchor())) {
|
||||
const QList<QTextCursor> sortedCursors = Utils::sorted(multiCursor.cursors());
|
||||
d->m_scope = Utils::MultiTextCursor(sortedCursors);
|
||||
d->m_scope = Utils::MultiTextCursor(Utils::sorted(multiCursor.cursors()));
|
||||
QTextCursor cursor = textCursor();
|
||||
cursor.clearSelection();
|
||||
setTextCursor(cursor);
|
||||
|
||||
Reference in New Issue
Block a user