hot fix zoom and scrolling

bug: was only zoom In
(int QPoint::manhattanLength() const
Returns the sum of the absolute values)
This commit is contained in:
Simon De Backer
2020-06-14 13:30:26 +02:00
committed by Laurent Trinques
parent 81992bc777
commit 35ba2bbe95

View File

@@ -415,11 +415,11 @@ void ElementView::wheelEvent(QWheelEvent *e) {
//Zoom and scrolling
if ( gestures() ) {
if (e -> modifiers() & Qt::ControlModifier)
e -> angleDelta().manhattanLength() > 0 ? zoomInSlowly() : zoomOutSlowly();
e -> angleDelta().y() > 0 ? zoomInSlowly() : zoomOutSlowly();
else
QGraphicsView::wheelEvent(e);
} else {
e -> angleDelta().manhattanLength() > 0 ? zoomIn(): zoomOut();
e -> angleDelta().y() > 0 ? zoomIn(): zoomOut();
}
}