QScintilla/Editor.py

branch
maintenance
changeset 5633
1a767ca5bbf3
parent 5468
c307358a2ecc
child 5680
b93cb6353cc0
diff -r ec9b9badcfdf -r 1a767ca5bbf3 QScintilla/Editor.py
--- a/QScintilla/Editor.py	Tue Mar 14 15:09:08 2017 +0100
+++ b/QScintilla/Editor.py	Sat Mar 18 14:19:22 2017 +0100
@@ -6560,15 +6560,15 @@
         if pinch:
             if pinch.state() == Qt.GestureStarted:
                 zoom = (self.getZoom() + 10) / 10.0
-                pinch.setScaleFactor(zoom)
-            else:
-                zoom = int(pinch.scaleFactor() * 10) - 10
+                pinch.setTotalScaleFactor(zoom)
+            elif pinch.state() == Qt.GestureUpdated:
+                zoom = int(pinch.totalScaleFactor() * 10) - 10
                 if zoom <= -9:
                     zoom = -9
-                    pinch.setScaleFactor(0.1)
+                    pinch.setTotalScaleFactor(0.1)
                 elif zoom >= 20:
                     zoom = 20
-                    pinch.setScaleFactor(3.0)
+                    pinch.setTotalScaleFactor(3.0)
                 self.zoomTo(zoom)
             evt.accept()
     

eric ide

mercurial