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()); }