Handle setting/clearing data a little more robustly.

This commit is contained in:
Kenneth Lyons 2019-06-06 23:57:34 -07:00
parent 501ad4f082
commit 654b76e6a3

View File

@ -45,9 +45,11 @@ class ErrorBarItem(GraphicsObject):
This method was added in version 0.9.9. For prior versions, use setOpts.
"""
if 'x' in opts and 'y' in opts:
self.setVisible(True)
self.opts.update(opts)
if self.opts['x'] is not None and self.opts['y'] is not None:
self.setVisible(True)
else:
self.setVisible(False)
self.path = None
self.update()
self.prepareGeometryChange()