diff options
author | Ariya Hidayat <ariya.hidayat@trolltech.com> | 2009-03-18 19:21:36 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@trolltech.com> | 2009-04-07 18:24:09 (GMT) |
commit | 980e01d69a29e2710a954e2bcd47d78039c76dbd (patch) | |
tree | b55d271db5f5204c1e9437ffdf02804d0515b346 /src/gui/graphicsview | |
parent | 31bba59443638a2f97f330a9b64ded261b060701 (diff) | |
download | Qt-980e01d69a29e2710a954e2bcd47d78039c76dbd.zip Qt-980e01d69a29e2710a954e2bcd47d78039c76dbd.tar.gz Qt-980e01d69a29e2710a954e2bcd47d78039c76dbd.tar.bz2 |
Fixes: Recreate the BSP tree properly.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index d4fcbd0..4b40d3b 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2383,14 +2383,12 @@ void QGraphicsScene::setItemIndexMethod(ItemIndexMethod method) return; } d->resetIndex(); - if (d->indexMethod != NoIndex) { + if (method == BspTreeIndex) { delete d->index; + d->index = new QGraphicsSceneBspTree(this); + // ### FIXME: transfer the items } d->indexMethod = method; - if (method == BspTreeIndex) { - d->index = new QGraphicsSceneBspTree(); - } - } void QGraphicsScene::setSceneIndex(QGraphicsSceneIndex *index) |