Don't show a negative size canvas.
authorGunnar Sletta <gunnar.sletta@digia.com>
Wed, 12 Jun 2013 14:35:46 +0000 (16:35 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 13 Jun 2013 10:44:16 +0000 (12:44 +0200)
This is in line with how Rectangle and Image elements
also behave.

Change-Id: I82cd6ecc6d233645bb3fd968f0f81218188a8991
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
src/quick/items/context2d/qquickcanvasitem.cpp

index 3b1b6d5..1b33680 100644 (file)
@@ -683,7 +683,7 @@ QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
 {
     Q_D(QQuickCanvasItem);
 
-    if (!d->context) {
+    if (!d->context || d->canvasWindow.size().isEmpty()) {
         delete oldNode;
         return 0;
     }