From 2a5e2ec000f506c21af4be9ba04c85586121d19a Mon Sep 17 00:00:00 2001 From: manongjohn Date: Jan 13 2019 18:47:35 +0000 Subject: Fix non-gesture based panning --- diff --git a/toonz/sources/toonzqt/schematicviewer.cpp b/toonz/sources/toonzqt/schematicviewer.cpp index fd4877f..c322e0e 100644 --- a/toonz/sources/toonzqt/schematicviewer.cpp +++ b/toonz/sources/toonzqt/schematicviewer.cpp @@ -239,14 +239,14 @@ void SchematicSceneViewer::mousePressEvent(QMouseEvent *me) { } else if (m_cursorMode == CursorMode::Hand) { m_firstPanPoint = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(me->pos()) - : me->pos() * getDevPixRatio(); + : me->pos(); m_panning = true; return; } } else if (m_buttonState == Qt::MidButton) { m_firstPanPoint = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(me->pos()) - : me->pos() * getDevPixRatio(); + : me->pos(); } bool drawRect = true; QList pointedItems = items(me->pos()); @@ -280,13 +280,13 @@ void SchematicSceneViewer::mouseMoveEvent(QMouseEvent *me) { if ((m_cursorMode == CursorMode::Hand && m_panning) || m_buttonState == Qt::MidButton) { QPointF usePos = m_touchDevice == QTouchDevice::TouchScreen - ? currScenePos - : currWinPos * getDevPixRatio(); + ? mapToScene(me->pos()) + : me->pos(); QPointF deltaPoint = usePos - m_firstPanPoint; panQt(deltaPoint); m_firstPanPoint = m_touchDevice == QTouchDevice::TouchScreen ? mapToScene(me->pos()) - : me->pos() * getDevPixRatio(); + : me->pos(); } else { if (m_cursorMode == CursorMode::Zoom && m_zooming) { int deltaY = (m_oldWinPos.y() - me->pos().y()) * 10;