Skip to content

Commit

Permalink
Fix Qt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-ogre committed Sep 29, 2023
1 parent b6b5da2 commit 19889cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visualizer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) -
Expand Down

0 comments on commit 19889cb

Please sign in to comment.