diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 07:50:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 19:27:03 -0700 |
commit | 0c2bfc1103d9f74877027c78a094d003412611e2 (patch) | |
tree | d1fad28ea807503e45956030e4d15d7e713a66ef | |
parent | bbf76f9ee7885f6bbc10862cc6604ce4beee80f4 (diff) | |
download | subsurface-0c2bfc1103d9f74877027c78a094d003412611e2.tar.gz |
cleanup: replace long obsolete delta() member
This has been deprecated for years.
The delta() member dealt with the old style mouse wheel that is associated with
a vertical scroll - so we need the y-component.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | profile-widget/profilewidget2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index fb2dff744..7dbb4cb05 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1014,10 +1014,10 @@ void ProfileWidget2::wheelEvent(QWheelEvent *event) QPoint toolTipPos = mapFromScene(toolTipItem->pos()); if (event->buttons() == Qt::LeftButton) return; - if (event->delta() > 0 && zoomLevel < 20) { + if (event->angleDelta().y() > 0 && zoomLevel < 20) { scale(zoomFactor, zoomFactor); zoomLevel++; - } else if (event->delta() < 0 && zoomLevel > 0) { + } else if (event->angleDelta().y() < 0 && zoomLevel > 0) { // Zooming out scale(1.0 / zoomFactor, 1.0 / zoomFactor); zoomLevel--; |