IconEditor/IconEditorWindow.py

changeset 5631
d0beabfaad42
parent 5406
8d09a23a8fdd
child 5651
982465f8389c
--- a/IconEditor/IconEditorWindow.py	Sat Mar 18 13:05:41 2017 +0100
+++ b/IconEditor/IconEditorWindow.py	Sat Mar 18 14:19:22 2017 +0100
@@ -1387,8 +1387,8 @@
         pinch = evt.gesture(Qt.PinchGesture)
         if pinch:
             if pinch.state() == Qt.GestureStarted:
-                pinch.setScaleFactor(self.__editor.zoomFactor() / 100.0)
-            else:
-                self.__editor.setZoomFactor(int(pinch.scaleFactor() * 100))
+                pinch.setTotalScaleFactor(self.__editor.zoomFactor() / 100.0)
+            elif pinch.state() == Qt.GestureUpdated:
+                self.__editor.setZoomFactor(int(pinch.totalScaleFactor() * 100))
                 self.__updateZoom()
             evt.accept()

eric ide

mercurial