mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +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
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user