Graphics/SvgDiagram.py

branch
maintenance
changeset 5633
1a767ca5bbf3
parent 5389
9b1c800daff3
child 5736
000ea446ff4b
equal deleted inserted replaced
5612:ec9b9badcfdf 5633:1a767ca5bbf3
190 @param evt reference to the gesture event (QGestureEvent 190 @param evt reference to the gesture event (QGestureEvent
191 """ 191 """
192 pinch = evt.gesture(Qt.PinchGesture) 192 pinch = evt.gesture(Qt.PinchGesture)
193 if pinch: 193 if pinch:
194 if pinch.state() == Qt.GestureStarted: 194 if pinch.state() == Qt.GestureStarted:
195 pinch.setScaleFactor(self.__zoom() / 100) 195 pinch.setTotalScaleFactor(self.__zoom() / 100)
196 else: 196 elif pinch.state() == Qt.GestureUpdated:
197 self.__doZoom(int(pinch.scaleFactor() * 100)) 197 self.__doZoom(int(pinch.totalScaleFactor() * 100))
198 evt.accept() 198 evt.accept()
199 199
200 ########################################################################### 200 ###########################################################################
201 ## Private menu handling methods below. 201 ## Private menu handling methods below.
202 ########################################################################### 202 ###########################################################################

eric ide

mercurial