Selaa lähdekoodia

pixelDelta() is only available on platforms that have high-resolution trackpads

Martijn Buijs 7 vuotta sitten
vanhempi
commit
6cffb91f24
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      labelme/canvas.py

+ 1 - 1
labelme/canvas.py

@@ -493,7 +493,7 @@ class Canvas(QtWidgets.QWidget):
     def wheelEvent(self, ev):
         if PYQT5:
             mods = ev.modifiers()
-            delta = ev.pixelDelta()
+            delta = ev.angleDelta()
             if QtCore.Qt.ControlModifier == int(mods):
                 # with Ctrl/Command key
                 # zoom