From 825b2aa7c3f7de3a4920b8b48fb952697ef864f6 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 22 Sep 2020 01:22:25 +0200 Subject: [PATCH] Fix for both QT4 and QT5 --- client/src/proxguiqt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/proxguiqt.cpp b/client/src/proxguiqt.cpp index 23e88343c..ce30cd35d 100644 --- a/client/src/proxguiqt.cpp +++ b/client/src/proxguiqt.cpp @@ -694,7 +694,11 @@ void Plot::wheelEvent(QWheelEvent *event) { x -= WIDTH_AXES; x = (int)(x / GraphPixelsPerPoint); x += GraphStart; +#if QT_VERSION >= 0x050000 + Zoom(1.0-(float)event->angleDelta().y()/(120/zoom_offset), x); +#else Zoom(1.0-(float)event->delta()/(120/zoom_offset), x); +#endif } else { Move(PageWidth*(-(float)event->delta()/(120/move_offset))); }