From 9c5325eaced54354a0ede051aa503d04aa9b2fb3 Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Tue, 24 Mar 2020 16:31:59 +0100 Subject: [PATCH] Fixed Qt 5.15 deprecated warnings --- src/QY2Graph.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QY2Graph.cc b/src/QY2Graph.cc index 6bed4d8..30f9b27 100644 --- a/src/QY2Graph.cc +++ b/src/QY2Graph.cc @@ -98,7 +98,7 @@ QY2Graph::wheelEvent(QWheelEvent* event) // 1 step of a typical mouse wheel results in a delta of +-120 // so we scale the view 1.41 or 0.71 // Scrolling up means zooming in. - scaleView(pow(2.0, event->delta() / 240.0)); + scaleView(pow(2.0, event->angleDelta().y() / 240.0)); } @@ -107,7 +107,7 @@ void QY2Graph::scaleView(qreal scaleFactor) { // the *current* scale - qreal f = sqrt(matrix().determinant()); + qreal f = sqrt(transform().determinant()); // clamp scaleFactor so that the *new* scale will lie between 0.1, 8.0 if (scaleFactor * f > 8.0)