forked from qt-creator/qt-creator
QmlDesigner: Update selection box on parent change
Selection box geometry update sets explicit global transform for selection box root. The transform depends on the target node parent, so if the parent changes, the box needs to be updated. Change-Id: Iccf8b7e863bcfe541bbb4f60a4094739a7513e8d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -98,6 +98,10 @@ void SelectionBoxGeometry::setTargetNode(QQuick3DNode *targetNode)
|
||||
QObject::connect(model, &QQuick3DModel::geometryChanged,
|
||||
this, &SelectionBoxGeometry::update, Qt::QueuedConnection);
|
||||
}
|
||||
if (m_targetNode) {
|
||||
QObject::connect(m_targetNode, &QQuick3DNode::parentChanged,
|
||||
this, &SelectionBoxGeometry::update, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
emit targetNodeChanged();
|
||||
update();
|
||||
|
Reference in New Issue
Block a user