From 8320616dfbe943242a04966b45d6c5a0e09e5248 Mon Sep 17 00:00:00 2001 From: Bea Lam 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 --- 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 c69fd50..b21843e 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()); -- 2.7.4