diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-12-09 15:46:46 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-12-11 10:59:10 +0000 |
commit | 128c7a34af2fc4e8b75f06979dd810953b9e4c08 (patch) | |
tree | 4dc0d2835d836a6552bb20a7d1056e1abf97624d | |
parent | f26d770322ca6b6b4575a7e2751243f9e2c09af6 (diff) | |
download | qt-creator-128c7a34af2fc4e8b75f06979dd810953b9e4c08.tar.gz |
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>
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp index 17b101326e..910501a9e4 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp @@ -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(); |