From: Soeren Apel Date: Sun, 18 Sep 2022 11:33:57 +0000 (+0200) Subject: Add missing version check X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9e5ccb72d09fe70cda63445aaf3957568567abf5;p=pulseview.git Add missing version check --- diff --git a/pv/views/trace/viewport.cpp b/pv/views/trace/viewport.cpp index 192e8f09..bab4f953 100644 --- a/pv/views/trace/viewport.cpp +++ b/pv/views/trace/viewport.cpp @@ -243,7 +243,11 @@ void Viewport::wheelEvent(QWheelEvent *event) (delta * height()) / (8 * 120)); } else { // Vertical scrolling is interpreted as zooming in/out +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) view_.zoom(delta / 120.0, event->position().x()); +#else + view_.zoom(delta / 120.0, event->x()); +#endif } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) } else if (event->angleDelta().x() != 0) {