Skip to content

Commit

Permalink
Add missing version check
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxa committed Sep 18, 2022
1 parent ffad6cd commit 9e5ccb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pv/views/trace/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9e5ccb7

Please sign in to comment.