From 8320616dfbe943242a04966b45d6c5a0e09e5248 Mon Sep 17 00:00:00 2001
From: Bea Lam <bea.lam@nokia.com>
Date: Thu, 19 Apr 2012 16:56:32 +1000
Subject: [PATCH] Paint TextInput when it is reparented

Wasn't being repainted if it was moved off then back into view as part
of a VisualItemModel with a ListView.

Task-number: QTBUG-24731
Change-Id: I4ba8035709d3e889fb3f0fe82ef0c0523a39ead8
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
---
 src/quick/items/qquicktextinput.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index c69fd50ff4..b21843e4af 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -1728,7 +1728,7 @@ QSGNode *QQuickTextInput::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
         node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext(), this);
     d->textNode = node;
 
-    if (!d->textLayoutDirty) {
+    if (!d->textLayoutDirty && oldNode != 0) {
         QSGSimpleRectNode *cursorNode = node->cursorNode();
         if (cursorNode != 0 && !isReadOnly()) {
             cursorNode->setRect(cursorRectangle());
-- 
GitLab