summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-26 13:34:48 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-26 13:34:48 (GMT)
commit153a79d3f72c51a072a651d658fdda0650b5665e (patch)
tree53bbd7bf533fd8b0b6e4f96ca8baa03d12f908e3
parent2ede9b2f2abc3e7e259d1a2520df238c27146ea4 (diff)
Add edit begin/end
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposerng.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/messagecomposer/src/composer-ng/richtextcomposerng.cpp b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
index ad9b43c..6a79a41 100644
--- a/messagecomposer/src/composer-ng/richtextcomposerng.cpp
+++ b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
@@ -377,6 +377,7 @@ void RichTextComposerNg::forceAutoCorrection(bool selectedText)
const bool richText = (textMode() == RichTextComposer::Rich);
const int initialPosition = textCursor().position();
QTextCursor cur = textCursor();
+ cur.beginEditBlock();
cur.movePosition(QTextCursor::Start);
while(!cur.atEnd()) {
if(isLineQuoted(cur.block().text())) {
@@ -387,6 +388,7 @@ void RichTextComposerNg::forceAutoCorrection(bool selectedText)
int cursortPosition = cur.position();
d->autoCorrection->autocorrect(richText, *document(), cursortPosition);
}
+ cur.endEditBlock();
if (cur.position() != initialPosition) {
cur.setPosition(initialPosition);
setTextCursor(cur);