summaryrefslogtreecommitdiff
path: root/src/main/python/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python/utils')
-rw-r--r--src/main/python/utils/graphics.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/python/utils/graphics.py b/src/main/python/utils/graphics.py
index e17fa49..c799217 100644
--- a/src/main/python/utils/graphics.py
+++ b/src/main/python/utils/graphics.py
@@ -54,7 +54,7 @@ class customView(QGraphicsView):
def wheelEvent(self, QWheelEvent):
#overload wheelevent, to zoom if control is pressed, else scroll normally
- if Qt.ControlModifier: #check if control is pressed
+ if QWheelEvent.modifiers() & Qt.ControlModifier: #check if control is pressed
if QWheelEvent.source() == Qt.MouseEventNotSynthesized: #check if precision mouse(mac)
# angle delta is 1/8th of a degree per scroll unit
if self.zoom + QWheelEvent.angleDelta().y()/2880 > 0.1: # hit and trial value (2880)
@@ -65,7 +65,7 @@ class customView(QGraphicsView):
self.zoom += QWheelEvent.angleDelta().y()
QWheelEvent.accept() # accept event so that scrolling doesnt happen simultaneously
else:
- return super().wheelEvent(self, QWheelEvent) # scroll if ctrl not pressed
+ return super(customView, self).wheelEvent(QWheelEvent) # scroll if ctrl not pressed
@property
def zoom(self):