mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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:
committed by
Laurent Trinques
parent
81992bc777
commit
35ba2bbe95
@@ -415,11 +415,11 @@ void ElementView::wheelEvent(QWheelEvent *e) {
|
|||||||
//Zoom and scrolling
|
//Zoom and scrolling
|
||||||
if ( gestures() ) {
|
if ( gestures() ) {
|
||||||
if (e -> modifiers() & Qt::ControlModifier)
|
if (e -> modifiers() & Qt::ControlModifier)
|
||||||
e -> angleDelta().manhattanLength() > 0 ? zoomInSlowly() : zoomOutSlowly();
|
e -> angleDelta().y() > 0 ? zoomInSlowly() : zoomOutSlowly();
|
||||||
else
|
else
|
||||||
QGraphicsView::wheelEvent(e);
|
QGraphicsView::wheelEvent(e);
|
||||||
} else {
|
} else {
|
||||||
e -> angleDelta().manhattanLength() > 0 ? zoomIn(): zoomOut();
|
e -> angleDelta().y() > 0 ? zoomIn(): zoomOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user