forked from qt-creator/qt-creator
Fix clipping for children
Task-ID: BAUHAUS-501
This commit is contained in:
@@ -74,6 +74,8 @@ void FormEditorItem::setup()
|
||||
setOpacity(qmlItemNode().instanceValue("opacity").toDouble());
|
||||
}
|
||||
|
||||
setFlag(QGraphicsItem::ItemClipsChildrenToShape, qmlItemNode().instanceValue("clip").toBool());
|
||||
|
||||
if (QGraphicsItem::parentItem() == scene()->formLayerItem())
|
||||
m_borderWidth = 0.0;
|
||||
|
||||
|
||||
@@ -165,6 +165,9 @@ void FormEditorScene::synchronizeOtherProperty(const QmlItemNode &qmlItemNode, c
|
||||
if (propertyName == "opacity")
|
||||
item->setOpacity(qmlItemNode.instanceValue("opacity").toDouble());
|
||||
|
||||
if (propertyName == "clip")
|
||||
item->setFlag(QGraphicsItem::ItemClipsChildrenToShape, qmlItemNode.instanceValue("clip").toBool());
|
||||
|
||||
if (item)
|
||||
item->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user