summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-02 10:39:02 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:30:42 (GMT)
commit99318bd50bf044c8202f670b667dc990ce90cfe1 (patch)
treeaef7c848a353b74c96869e56da6bf834a365c0fd /src/gui/graphicsview/qgraphicsitem.cpp
parent1fc2406f35594706a9aafa9374694cf0a65cee30 (diff)
downloadQt-99318bd50bf044c8202f670b667dc990ce90cfe1.zip
Qt-99318bd50bf044c8202f670b667dc990ce90cfe1.tar.gz
Qt-99318bd50bf044c8202f670b667dc990ce90cfe1.tar.bz2
Fix sorting bug and ensure render functions work. Make direct default.
Mark the children list for sorting when the Z value for items changes. Change the signature of the recursive draw function slightly so that the expose region is optional, and ensure we don't intersect with this region if it's not available. This change also flips the direct painting so that the default is to use the recursive approach.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index e1389b5..17cab45 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3151,6 +3151,7 @@ void QGraphicsItem::setZValue(qreal z)
if (newZ == d_ptr->z)
return;
d_ptr->z = newZ;
+ d_ptr->needSortChildren = 1;
if (d_ptr->scene) {
d_ptr->scene->d_func()->markDirty(this, QRectF(), /*invalidateChildren=*/true);