Fix crash when loading any Qml file in QuickDesigner

Qt change f5c5e20ab20f016c0735 optimizes the calculation of the
children's bounding rect by taking the parent bounding rect into
account. This led to a recursion in the QuickDesigner Form Editor,
because LayerItem::boundingRect() is defined as the children's bounding
rect.

Break the cycle by setting ItemClipsChildrenToShape to false.
(cherry picked from commit 2067cfcf28)
This commit is contained in:
Kai Koehne
2010-07-19 16:53:40 +02:00
parent 07845306db
commit 50f3547479

View File

@@ -65,7 +65,7 @@ FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorV
m_manipulatorLayerItem->setZValue(1.0);
m_formLayerItem->setZValue(0.0);
m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, false);
view->setScene(this);
setItemIndexMethod(QGraphicsScene::NoIndex);