forked from qt-creator/qt-creator
QmlDesigner: Allow snap back to 0 rotation during drag
Start rotation should be restored when desired angle for rotation is 0. Fixes: QDS-10652 Change-Id: I8e733b714f6a0f14561c270aefc5049bdfaff39e Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -699,8 +699,8 @@ qreal QmlDesigner::Internal::MouseArea3D::getNewRotationAngle(
|
||||
void QmlDesigner::Internal::MouseArea3D::applyRotationAngleToNode(
|
||||
QQuick3DNode *node, const QVector3D &startRotation, qreal angle)
|
||||
{
|
||||
node->setEulerRotation(startRotation);
|
||||
if (!qFuzzyIsNull(angle)) {
|
||||
node->setEulerRotation(startRotation);
|
||||
QVector3D normal = getNormal();
|
||||
node->rotate(qRadiansToDegrees(angle), normal, QQuick3DNode::SceneSpace);
|
||||
}
|
||||
|
Reference in New Issue
Block a user