summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-04-24 01:18:54 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-04-24 01:18:54 (GMT)
commit19a507c5cc8c178a0e00fa302f6315c4b18b50a5 (patch)
tree9087a081878c157e8ced4af9b3062679486453d8
parent728e1e1c3678768aafeb07ebe8e17dd2fbf047b2 (diff)
downloadQt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.zip
Qt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.tar.gz
Qt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.tar.bz2
Ensure -ve z stacks behind parent when using GraphicsView
-rw-r--r--src/declarative/canvas/qsimplecanvasitem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/canvas/qsimplecanvasitem.cpp b/src/declarative/canvas/qsimplecanvasitem.cpp
index 7d9f61c..95f7623 100644
--- a/src/declarative/canvas/qsimplecanvasitem.cpp
+++ b/src/declarative/canvas/qsimplecanvasitem.cpp
@@ -443,7 +443,16 @@ void QSimpleCanvasItem::setZ(qreal z)
return;
if(d->graphicsItem) {
+
+ if(z < 0)
+ d->graphicsItem->setFlag(QGraphicsItem::ItemStacksBehindParent,
+ true);
+ else
+ d->graphicsItem->setFlag(QGraphicsItem::ItemStacksBehindParent,
+ false);
+
d->graphicsItem->setZValue(z);
+
} else {
if(d->data()->z == z)
return;