Fixed AxisMouse drag issue

Issue where MouseDragEvent would only work for 1 AxisItem. Allowed the MouseDragEvent to propagate to other AxisItems. I had this issue by setting the ViewBox background color and changed the AxisItem ZValue to make the AxisItems visible which made the AxisItem receive all of the MouseDragEvents and only one Axis would actually allow dragging.
This commit is contained in:
HashSplat 2017-09-20 17:15:54 -04:00
parent 0321ecb215
commit 9bfdda06a6

View File

@ -1066,9 +1066,11 @@ class AxisItem(GraphicsWidget):
if self.linkedView() is None:
return
if self.orientation in ['left', 'right']:
return self.linkedView().mouseDragEvent(event, axis=1)
ret = self.linkedView().mouseDragEvent(event, axis=1)
else:
return self.linkedView().mouseDragEvent(event, axis=0)
ret = self.linkedView().mouseDragEvent(event, axis=0)
event.ignore()
return ret
def mouseClickEvent(self, event):
if self.linkedView() is None: