Fix preedit text visibility when TextInput is empty
authorJiang Jiang <jiang.jiang@nokia.com>
Thu, 12 Jan 2012 15:28:22 +0000 (16:28 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 12 Jan 2012 16:34:09 +0000 (17:34 +0100)
Task-number: QTBUG-22646

Change-Id: I5162ffdebdee6f956a9a79b2307a2ac53cc4890b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/quick/items/qquicktextinput.cpp

index 0ef3cd6..e569581 100644 (file)
@@ -1625,7 +1625,7 @@ QSGNode *QQuickTextInput::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
             offset = -QPoint(d->hscroll, d->vscroll);
         }
 
-        if (!d->m_textLayout.text().isEmpty()) {
+        if (!d->m_textLayout.text().isEmpty() || !d->m_textLayout.preeditAreaText().isEmpty()) {
             node->addTextLayout(offset, &d->m_textLayout, d->color,
                                 QQuickText::Normal, QColor(),
                                 d->selectionColor, d->selectedTextColor,