Merge pull request #1714 from j9ac9k/merge-519-in-master

Expose the `clickable` property of `PlotDataItem`. (#519)
This commit is contained in:
Ogi Moore 2021-04-13 23:20:11 -07:00 committed by GitHub
commit dfa225f56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,6 +208,7 @@ class PlotDataItem(GraphicsObject):
'data': None,
}
self.setCurveClickable(kargs.get('clickable', False))
self.setData(*args, **kargs)
def implements(self, interface=None):
@ -219,6 +220,12 @@ class PlotDataItem(GraphicsObject):
def name(self):
return self.opts.get('name', None)
def setCurveClickable(self, s, width=None):
self.curve.setClickable(s, width)
def curveClickable(self):
return self.curve.clickable
def boundingRect(self):
return QtCore.QRectF() ## let child items handle this