From: Bea Lam Date: Thu, 19 Apr 2012 06:56:32 +0000 (+1000) Subject: Paint TextInput when it is reparented X-Git-Tag: upstream/5.2.1~2063 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8320616dfbe943242a04966b45d6c5a0e09e5248;p=platform%2Fupstream%2Fqtdeclarative.git 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 --- 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());