From 0458f7d594ec0a812d95b36d218df9bf593ff6b2 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Jan 14 2019 05:40:19 +0000 Subject: Another touchpad zooming adjustment --- diff --git a/toonz/sources/toonzqt/schematicviewer.cpp b/toonz/sources/toonzqt/schematicviewer.cpp index 5e3deb1..1293118 100644 --- a/toonz/sources/toonzqt/schematicviewer.cpp +++ b/toonz/sources/toonzqt/schematicviewer.cpp @@ -426,16 +426,14 @@ void SchematicSceneViewer::zoomQt(bool zoomin, bool resetZoom) { */ void SchematicSceneViewer::changeScale(const QPoint &winPos, qreal scaleFactor) { - int devPixRatio = - m_touchDevice == QTouchDevice::TouchScreen ? 1 : getDevPixRatio(); QPointF startScenePos = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(winPos) - : winPos * devPixRatio; + : mapToScene(winPos) * getDevPixRatio(); QMatrix scale = QMatrix().scale(scaleFactor, scaleFactor); setMatrix(scale, true); QPointF endScenePos = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(winPos) - : winPos * devPixRatio; + : mapToScene(winPos) * getDevPixRatio(); QPointF delta = endScenePos - startScenePos; translate(delta.x(), delta.y()); }