Fix embedding images in text elements
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tue, 19 Feb 2013 09:26:44 +0000 (10:26 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 19 Feb 2013 10:24:39 +0000 (11:24 +0100)
It seems that the the inner target rect has either been added
recently or its default has been changed to something invalid,
because we need to set it to the same as targetRect for the
image to show up at all.

Task-number: QTBUG-29560
Change-Id: I0fe6b7c5ab07afc780b8ea33a7ccc210861e0821
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

src/quick/items/qquicktextnode.cpp

index 4d3f97a..5e1b20c 100644 (file)
@@ -1105,6 +1105,7 @@ void QQuickTextNode::addImage(const QRectF &rect, const QImage &image)
     QSGTexture *texture = m_context->createTexture(image);
     m_textures.append(texture);
     node->setTargetRect(rect);
+    node->setInnerTargetRect(rect);
     node->setTexture(texture);
     appendChildNode(node);
     node->update();