From 13d4e6cb75ade8a81d65ea359c65b81288010e3b Mon Sep 17 00:00:00 2001 From: peri4 Date: Sun, 13 Jul 2025 00:28:53 +0300 Subject: [PATCH] gesture pitch & pan fix --- libs/graphic/graphic.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/graphic/graphic.cpp b/libs/graphic/graphic.cpp index c6b2b10..83582d6 100644 --- a/libs/graphic/graphic.cpp +++ b/libs/graphic/graphic.cpp @@ -342,6 +342,7 @@ void Graphic::procGesture(QGesture * g) { QPointF dp = -pg->delta(); dp.rx() /= getScaleX(); dp.ry() /= getScaleY(); + dp.ry() = -dp.y(); selrect.translate(dp); totalUpdate(); } break; @@ -357,11 +358,7 @@ void Graphic::procGesture(QGesture * g) { } break; case Qt::TapAndHoldGesture: { QTapAndHoldGesture * pg = (QTapAndHoldGesture *)g; - if (pg->state() == Qt::GestureStarted) - QMetaObject::invokeMethod( - this, - [this]() { showMenu(); }, - Qt::QueuedConnection); + if (pg->state() == Qt::GestureStarted) QMetaObject::invokeMethod(this, [this]() { showMenu(); }, Qt::QueuedConnection); } break; default: break; }