Skip to content

Commit

Permalink
Replace Qt QWheelEvent obsolte delta() with angleDelta()
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHeho committed Dec 23, 2023
1 parent ff48a15 commit 1de91a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/quserinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,9 @@ void ssr::QUserInterface::wheelEvent(QWheelEvent *event)
event->accept();

// update zoom
int delta = event->angleDelta().y();
_set_zoom(static_cast<int>(_zoom_factor/STDZOOMFACTOR *
(100.0f+event->delta()/100.f*5.0f) + 0.5f));
(100.0f+delta/100.f*5.0f) + 0.5f));
}

/** Handles Qt drag & drop events.
Expand Down

0 comments on commit 1de91a4

Please sign in to comment.