Fixed mouse wheel in RemoteGraphicsView + PySide

This commit is contained in:
Luke Campagnola 2014-04-20 14:04:33 -04:00
parent b8840e2224
commit 5cea58545f

View File

@ -108,7 +108,7 @@ class RemoteGraphicsView(QtGui.QWidget):
return QtGui.QWidget.mouseMoveEvent(self, ev)
def wheelEvent(self, ev):
self._view.wheelEvent(ev.pos(), ev.globalPos(), ev.delta(), int(ev.buttons()), int(ev.modifiers()), ev.orientation(), _callSync='off')
self._view.wheelEvent(ev.pos(), ev.globalPos(), ev.delta(), int(ev.buttons()), int(ev.modifiers()), int(ev.orientation()), _callSync='off')
ev.accept()
return QtGui.QWidget.wheelEvent(self, ev)
@ -243,6 +243,7 @@ class Renderer(GraphicsView):
def wheelEvent(self, pos, gpos, d, btns, mods, ori):
btns = QtCore.Qt.MouseButtons(btns)
mods = QtCore.Qt.KeyboardModifiers(mods)
ori = (None, QtCore.Qt.Horizontal, QtCore.Qt.Vertical)[ori]
return GraphicsView.wheelEvent(self, QtGui.QWheelEvent(pos, gpos, d, btns, mods, ori))
def keyEvent(self, typ, mods, text, autorep, count):