aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-10-26 12:42:25 +0200
committerQt by Nokia <qt-info@nokia.com>2011-11-07 18:58:27 +0100
commit0dc0db6a6eb3b86ee56c0d101c76263f91a17c55 (patch)
tree831da79904c793f7f75bd24675d2450114332c9e /src
parent59c3556a6b794ed0cbfd838d216065f876eb7468 (diff)
Don't create geometries for transparent Rectangle {} elements
Change-Id: If59f7ad7f85849559707cecacc9e2d917e68ab26 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qquickrectangle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/items/qquickrectangle.cpp b/src/declarative/items/qquickrectangle.cpp
index a09202c29a..c3cbaaa00e 100644
--- a/src/declarative/items/qquickrectangle.cpp
+++ b/src/declarative/items/qquickrectangle.cpp
@@ -492,7 +492,8 @@ QSGNode *QQuickRectangle::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
Q_UNUSED(data);
Q_D(QQuickRectangle);
- if (width() <= 0 || height() <= 0) {
+ if (width() <= 0 || height() <= 0
+ || (d->color.alpha() == 0 && (!d->pen || d->pen->width() == 0 || d->pen->color().alpha() == 0))) {
delete oldNode;
return 0;
}