Gui: Gesture: fix tilt angle sign

This commit is contained in:
DeepSOIC
2018-11-28 13:53:40 +03:00
committed by Yorik van Havre
parent 46d0d4c80c
commit b09fb97ad8
2 changed files with 3 additions and 3 deletions

View File

@@ -84,8 +84,8 @@ SoGesturePinchEvent::SoGesturePinchEvent(QPinchGesture* qpinch, QWidget *widget)
deltaZoom = qpinch->scaleFactor();
totalZoom = qpinch->totalScaleFactor();
deltaAngle = unbranchAngle((qpinch->rotationAngle()-qpinch->lastRotationAngle()) / 180.0 * M_PI);
totalAngle = qpinch->totalRotationAngle() / 180 * M_PI;
deltaAngle = -unbranchAngle((qpinch->rotationAngle()-qpinch->lastRotationAngle()) / 180.0 * M_PI);
totalAngle = -qpinch->totalRotationAngle() / 180 * M_PI;
state = SbGestureState(qpinch->state());

View File

@@ -129,7 +129,7 @@ QGestureRecognizer::Result WinNativeGestureRecognizerPinch::recognize(QGesture *
}
double ang = 0.0;
if (bRotate)
ang=GID_ROTATE_ANGLE_FROM_ARGUMENT(LOWORD(ev->argument)) / M_PI * 180.0;
ang = -GID_ROTATE_ANGLE_FROM_ARGUMENT(LOWORD(ev->argument)) / M_PI * 180.0;
if (q->state() == Qt::NoGesture) {
//start of a new gesture, prefill stuff
//d->isNewSequence = true;