Graphics/UMLGraphicsView.py

changeset 5631
d0beabfaad42
parent 5587
ea526b78ee6c
child 5680
b93cb6353cc0
child 5736
000ea446ff4b
--- a/Graphics/UMLGraphicsView.py	Sat Mar 18 13:05:41 2017 +0100
+++ b/Graphics/UMLGraphicsView.py	Sat Mar 18 14:19:22 2017 +0100
@@ -636,9 +636,9 @@
         pinch = evt.gesture(Qt.PinchGesture)
         if pinch:
             if pinch.state() == Qt.GestureStarted:
-                pinch.setScaleFactor(self.zoom() / 100.0)
-            else:
-                self.setZoom(int(pinch.scaleFactor() * 100))
+                pinch.setTotalScaleFactor(self.zoom() / 100.0)
+            elif pinch.state() == Qt.GestureUpdated:
+                self.setZoom(int(pinch.totalScaleFactor() * 100))
             evt.accept()
     
     def getItemId(self):

eric ide

mercurial