diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-05 08:11:05 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:35:03 (GMT) |
commit | 1c0599289a3da43b0a7cdb38eebe05d45f69ad9c (patch) | |
tree | f4969641dbda49ffad98d6b1bba3da8c4a8d6bf0 /src | |
parent | 5ab06593a1ed4c050d19f734737a50078b0fbb52 (diff) | |
download | Qt-1c0599289a3da43b0a7cdb38eebe05d45f69ad9c.zip Qt-1c0599289a3da43b0a7cdb38eebe05d45f69ad9c.tar.gz Qt-1c0599289a3da43b0a7cdb38eebe05d45f69ad9c.tar.bz2 |
Fix tst_QGraphicsView::cursor2() - sorting bug when using BSP tree.
Make sure we don't claim that we have sorted all toplevel items when
we are using the BSP tree, as when painting we have only actually sorted
a subset of the elements.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 4b54c08..6c78ca9 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5217,11 +5217,11 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter * if (item && item->d_ptr->needSortChildren) { item->d_ptr->needSortChildren = 0; qStableSort(children->begin(), children->end(), qt_notclosestLeaf); + } else if (!item && children == &tmp) { + qStableSort(children->begin(), children->end(), qt_notclosestLeaf); } else if (!item && needSortTopLevelItems) { needSortTopLevelItems = false; qStableSort(children->begin(), children->end(), qt_notclosestLeaf); - } else if (!item && children == &tmp) { - qStableSort(children->begin(), children->end(), qt_notclosestLeaf); } } |