Graphics/PixmapDiagram.py

changeset 5631
d0beabfaad42
parent 5389
9b1c800daff3
child 5736
000ea446ff4b
--- a/Graphics/PixmapDiagram.py	Sat Mar 18 13:05:41 2017 +0100
+++ b/Graphics/PixmapDiagram.py	Sat Mar 18 14:19:22 2017 +0100
@@ -222,9 +222,9 @@
         pinch = evt.gesture(Qt.PinchGesture)
         if pinch:
             if pinch.state() == Qt.GestureStarted:
-                pinch.setScaleFactor(self.__zoom() / 100)
-            else:
-                self.__doZoom(int(pinch.scaleFactor() * 100))
+                pinch.setTotalScaleFactor(self.__zoom() / 100)
+            elif pinch.state() == Qt.GestureUpdated:
+                self.__doZoom(int(pinch.totalScaleFactor() * 100))
             evt.accept()
     
     ###########################################################################

eric ide

mercurial