From 728e1e1c3678768aafeb07ebe8e17dd2fbf047b2 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 24 Apr 2009 11:09:39 +1000 Subject: Don't manually stack children on GraphicsView GraphicsView now has a sane default stacking order. --- src/declarative/canvas/qsimplecanvasitem.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/declarative/canvas/qsimplecanvasitem.cpp b/src/declarative/canvas/qsimplecanvasitem.cpp index 5e4b5fa..7d9f61c 100644 --- a/src/declarative/canvas/qsimplecanvasitem.cpp +++ b/src/declarative/canvas/qsimplecanvasitem.cpp @@ -626,12 +626,8 @@ void QSimpleCanvasItem::addChild(QSimpleCanvasItem *c) { Q_D(QSimpleCanvasItem); d->children.append(c); - if(d->graphicsItem) { - // XXX - GraphicsView does not preserve the stacking order of items - c->setZ(d->children.count()); - } else { + if(!d->graphicsItem) d->needsZOrder = true; - } childrenChanged(); } -- cgit v0.12