]> sigrok.org Git - pulseview.git/commitdiff
Add missing version check
authorSoeren Apel <redacted>
Sun, 18 Sep 2022 11:33:57 +0000 (13:33 +0200)
committerSoeren Apel <redacted>
Sun, 18 Sep 2022 11:33:57 +0000 (13:33 +0200)
pv/views/trace/viewport.cpp

index 192e8f096303aca51013254b70582e3dd4398d42..bab4f95368aa55569ef95bffb2c91a712b72d3e5 100644 (file)
@@ -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) {