summaryrefslogtreecommitdiff
path: root/src/main/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python')
-rw-r--r--src/main/python/main.py2
-rw-r--r--src/main/python/utils/graphics.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 9def7fb..1869067 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -184,7 +184,7 @@ class appWindow(QMainWindow):
#Key input handler
def keyPressEvent(self, event):
#overload key press event for custom keyboard shortcuts
- if event.modifiers() and Qt.ControlModifier:
+ if event.modifiers() & Qt.ControlModifier:
if event.key() == Qt.Key_N:
self.newProject()
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):