Fix truncation and incorrect formatting of RichText.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 6 Feb 2012 02:36:43 +0000 (12:36 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 6 Feb 2012 23:14:53 +0000 (00:14 +0100)
Update the text position when adding text.

Task-number: QTBUG-23981
Change-Id: I4a10916559745e8df805b1f8563522341bc6f69b
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/quick/items/qquicktextnode.cpp

index 4c5e18f..82a3ada 100644 (file)
@@ -1251,7 +1251,7 @@ void QQuickTextNode::addTextDocument(const QPointF &position, QTextDocument *tex
                             fragmentEnd += preeditLength;
                         }
 
-                        engine.addText(block, charFormat, textColor, colorChanges, textPos, fragmentEnd,
+                        textPos = engine.addText(block, charFormat, textColor, colorChanges, textPos, fragmentEnd,
                                        selectionStart, selectionEnd);
                     }