diff --git a/toonz/sources/toonzqt/schematicviewer.cpp b/toonz/sources/toonzqt/schematicviewer.cpp index c322e0e..5e3deb1 100644 --- a/toonz/sources/toonzqt/schematicviewer.cpp +++ b/toonz/sources/toonzqt/schematicviewer.cpp @@ -426,14 +426,16 @@ 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 * getDevPixRatio(); + : winPos * devPixRatio; QMatrix scale = QMatrix().scale(scaleFactor, scaleFactor); setMatrix(scale, true); QPointF endScenePos = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(winPos) - : winPos * getDevPixRatio(); + : winPos * devPixRatio; QPointF delta = endScenePos - startScenePos; translate(delta.x(), delta.y()); }