From 19889cb90b8372ffe2efa7206299568f7dc8b073 Mon Sep 17 00:00:00 2001 From: artem-ogre Date: Sat, 30 Sep 2023 01:14:56 +0200 Subject: [PATCH] Fix Qt warnings --- visualizer/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/visualizer/main.cpp b/visualizer/main.cpp index ea0a7eb..eafe766 100644 --- a/visualizer/main.cpp +++ b/visualizer/main.cpp @@ -455,12 +455,12 @@ public slots: void wheelEvent(QWheelEvent* event) { const double newScale = - m_scale * std::max(0.3, (1. + event->delta() * 8e-4)); + m_scale * std::max(0.3, (1. + event->angleDelta().y() * 8e-4)); if(m_scale == newScale) { return; } - const QPointF cursor = event->posF(); + const QPointF cursor = event->position(); const QPointF scenePt = screenToScene(cursor); const QPointF screenCenter = QPointF(width(), height()) / 2.0; m_translation = cursor - newScale * QPointF(scenePt.x(), -scenePt.y()) -