diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 90e876c..f96f66b 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1849,8 +1849,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + cursor.beginEditBlock(); if (isGettingInput) { - cursor.beginEditBlock(); cursor.removeSelectedText(); } @@ -1898,9 +1898,7 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) } } layout->setAdditionalFormats(overrides); - - if (isGettingInput) - cursor.endEditBlock(); + cursor.endEditBlock(); } QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const |