Graphics/UMLGraphicsView.py

changeset 1507
9225700cbff5
parent 1155
4cbef040f07e
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1506:f28af766e539 1507:9225700cbff5
500 yOffset = (rect.y() + rect.height() // 2) - \ 500 yOffset = (rect.y() + rect.height() // 2) - \
501 (itemrect.y() + itemrect.height() // 2) 501 (itemrect.y() + itemrect.height() // 2)
502 item.moveBy(xOffset, yOffset) 502 item.moveBy(xOffset, yOffset)
503 503
504 self.scene().update() 504 self.scene().update()
505
506 def wheelEvent(self, evt):
507 """
508 Protected method to handle wheel events.
509
510 @param evt reference to the wheel event (QWheelEvent)
511 """
512 if evt.modifiers() & Qt.ControlModifier:
513 if evt.delta()< 0:
514 self.zoomOut()
515 else:
516 self.zoomIn()
517 evt.accept()
518 return
519
520 super().wheelEvent(evt)

eric ide

mercurial