Merge pull request #739 from campagnola/wheel-event-fix
Fix error in ViewBox wheelEvent when mouse has 2-axis wheel events
This commit is contained in:
commit
9aaae8d5dc
@ -1125,7 +1125,7 @@ class ViewBox(GraphicsWidget):
|
|||||||
return self.mapSceneToView(item.sceneBoundingRect()).boundingRect()
|
return self.mapSceneToView(item.sceneBoundingRect()).boundingRect()
|
||||||
|
|
||||||
def wheelEvent(self, ev, axis=None):
|
def wheelEvent(self, ev, axis=None):
|
||||||
if axis is not None and axis >= 0 and axis < len(mask):
|
if axis in (0, 1):
|
||||||
mask = [False, False]
|
mask = [False, False]
|
||||||
mask[axis] = self.state['mouseEnabled'][axis]
|
mask[axis] = self.state['mouseEnabled'][axis]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user