From: Robin Burchell Date: Mon, 4 Nov 2013 13:18:26 +0000 (+0100) Subject: Fix preedit text layout X-Git-Tag: upstream/5.2.1~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d87c1471f1f61133edad313d5159f9fee9e938c5;p=platform%2Fupstream%2Fqtdeclarative.git Fix preedit text layout preeditPosition is relative to the block position Done-with: Aaron Kennedy Change-Id: If96a1d0939f84ab11f0642d5fe78d786c30f418a Reviewed-by: Gunnar Sletta --- diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp index fe7effa..e9ff70e 100644 --- a/src/quick/items/qquicktextnodeengine.cpp +++ b/src/quick/items/qquicktextnodeengine.cpp @@ -898,8 +898,8 @@ void QQuickTextNodeEngine::addTextBlock(QTextDocument *textDocument, const QText int fragmentEnd = textPos + fragment.length(); #ifndef QT_NO_IM if (preeditPosition >= 0 - && preeditPosition >= textPos - && preeditPosition <= fragmentEnd) { + && (preeditPosition + block.position()) >= textPos + && (preeditPosition + block.position()) <= fragmentEnd) { fragmentEnd += preeditLength; } #endif