Avoid implicit int conversion for mouse buttons
This commit is contained in:
parent
52de9554bb
commit
342fbb053f
@ -800,7 +800,7 @@ class ROI(GraphicsObject):
|
||||
if ev.button() == QtCore.Qt.RightButton and self.contextMenuEnabled():
|
||||
self.raiseContextMenu(ev)
|
||||
ev.accept()
|
||||
elif ev.button() & self.acceptedMouseButtons():
|
||||
elif ev.button() in self.acceptedMouseButtons():
|
||||
ev.accept()
|
||||
self.sigClicked.emit(self, ev)
|
||||
else:
|
||||
|
@ -1243,7 +1243,7 @@ class ViewBox(GraphicsWidget):
|
||||
mask[1-axis] = 0.0
|
||||
|
||||
## Scale or translate based on mouse button
|
||||
if ev.button() & (QtCore.Qt.LeftButton | QtCore.Qt.MiddleButton):
|
||||
if ev.button() in [QtCore.Qt.LeftButton, QtCore.Qt.MiddleButton]:
|
||||
if self.state['mouseMode'] == ViewBox.RectMode and axis is None:
|
||||
if ev.isFinish(): ## This is the final move in the drag; change the view scale now
|
||||
#print "finish"
|
||||
|
Loading…
Reference in New Issue
Block a user