From 128c7a34af2fc4e8b75f06979dd810953b9e4c08 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 9 Dec 2019 15:46:46 +0200 Subject: [PATCH] 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 Reviewed-by: Mahmoud Badri --- .../qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp index 17b101326e9..910501a9e4f 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();