Fix funny behaviour when pasting. basically we should start but not end a cursor edit block.
This commit is contained in:
@@ -400,7 +400,6 @@ void ChatKeyHelper::checkMouseSelection()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool selectingLink = false;
|
bool selectingLink = false;
|
||||||
cursor.beginEditBlock();
|
|
||||||
cursor.setPosition(m_textItem->selectionStart());
|
cursor.setPosition(m_textItem->selectionStart());
|
||||||
if (cursor.charFormat().isAnchor()) {
|
if (cursor.charFormat().isAnchor()) {
|
||||||
selectingLink = true;
|
selectingLink = true;
|
||||||
@@ -428,7 +427,6 @@ void ChatKeyHelper::checkMouseSelection()
|
|||||||
cursor.movePosition(QTextCursor::PreviousCharacter);
|
cursor.movePosition(QTextCursor::PreviousCharacter);
|
||||||
currentCharFormat = cursor.charFormat();
|
currentCharFormat = cursor.charFormat();
|
||||||
}
|
}
|
||||||
cursor.endEditBlock();
|
|
||||||
selectRight(cursor);
|
selectRight(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user