Skip to content

Commit

Permalink
Fixed Qt 5.15 deprecated warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Mar 24, 2020
1 parent e62e870 commit 9c5325e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QY2Graph.cc
Expand Up @@ -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));
}


Expand All @@ -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)
Expand Down

0 comments on commit 9c5325e

Please sign in to comment.