summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-30 16:41:18 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-30 16:55:36 (GMT)
commita1d5b33bd33ecf1d809346a39d2386cafaf50cef (patch)
tree0039a1ee15ed3a9fce10e78e41bcb1d4ee131a8a
parent53ef0b0f8b1227cff6ce4c9e2a91a6fbc7e7ee3b (diff)
downloadQt-a1d5b33bd33ecf1d809346a39d2386cafaf50cef.zip
Qt-a1d5b33bd33ecf1d809346a39d2386cafaf50cef.tar.gz
Qt-a1d5b33bd33ecf1d809346a39d2386cafaf50cef.tar.bz2
Partially revert 7fe4f8ff71cf09bbabbd3438ef637fe408a11c33
We have to ensure that the item's top-level is marked as discovered. This broke the dragandroprobot example after we started using the BSP from QGraphicsSceneIndex::items()* (see 6ee3fb750377eeedf161d96fef02c5fa336810e9)
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index faacf4d..ed1d2f3 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1087,11 +1087,8 @@ QList<QGraphicsItem *> QGraphicsScenePrivate::topLevelItemsInStackingOrder(const
QList<QGraphicsItem *> tmp = index->estimateItems(sceneRect, Qt::SortOrder(-1),
viewTransform ? *viewTransform : QTransform());
- for (int i = 0; i < tmp.size(); ++i) {
- QGraphicsItem *item = tmp.at(i);
- if (!item->d_ptr->parent)
- item->d_ptr->itemDiscovered = 1;
- }
+ for (int i = 0; i < tmp.size(); ++i)
+ tmp.at(i)->topLevelItem()->d_ptr->itemDiscovered = 1;
// Sort if the toplevel list is unsorted.
if (needSortTopLevelItems) {