mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
bbf76f9ee7
commit
0c2bfc1103
1 changed files with 2 additions and 2 deletions
|
@ -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--;
|
||||
|
|
Loading…
Add table
Reference in a new issue