commit 412b236ace3096435a8b5cac122b24f3f8944cea parent c6d22bc409ffd454365f3b4065c51a02310b9873 Author: Matt Demanett <matt@demanett.net> Date: Thu, 24 Sep 2020 00:30:15 -0400 WALK2: fix mouse tracking to account for zoom level. Diffstat:
M | src/Walk2.cpp | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Walk2.cpp b/src/Walk2.cpp @@ -206,8 +206,9 @@ struct Walk2Display : TransparentWidget { } void onDragMove(const event::DragMove& e) override { - _dragLast.x += e.mouseDelta.x; - _dragLast.y += e.mouseDelta.y; + float zoom = APP->scene->rackScroll->zoomWidget->zoom; + _dragLast.x += e.mouseDelta.x / zoom; + _dragLast.y += e.mouseDelta.y / zoom; maybeJump(_dragLast); }