From 995629aba904f730b773b5a811e74f63ea0ff517 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 24 Nov 2009 14:55:11 +0100 Subject: Incorrect background while composing Japanese text(e.g 'shi' + ). This happens only when there is a single japanese character entered & the suggested text is same as the one already displayed. In this case, black background was not drawn correctly. Reviewed-by: Simon Hausmann Reviewed-by: axis --- src/gui/text/qtextcontrol.cpp | 6 ++---- 1 file 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 -- cgit v0.12