forked from qt-creator/qt-creator
QmlDesigner: Use NodeHints for clipping in form editor
Change-Id: Icbc8e08cab760020126324bcae6dd5909508d5d3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "formeditorscene.h"
|
||||
|
||||
#include <modelnode.h>
|
||||
#include <nodehints.h>
|
||||
#include <nodemetainfo.h>
|
||||
|
||||
#include <QDebug>
|
||||
@@ -66,6 +67,13 @@ void FormEditorItem::setup()
|
||||
|
||||
setFlag(QGraphicsItem::ItemClipsChildrenToShape, qmlItemNode().instanceValue("clip").toBool());
|
||||
|
||||
|
||||
if (NodeHints::fromModelNode(qmlItemNode()).forceClip()) {
|
||||
setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
|
||||
setFlag(QGraphicsItem::ItemClipsToShape, true);
|
||||
}
|
||||
|
||||
|
||||
if (QGraphicsItem::parentItem() == scene()->formLayerItem())
|
||||
m_borderWidth = 0.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user