Clear ds line graphics on switch back to bars

marketstore_backup
Tyler Goodlet 2022-03-24 13:29:45 -04:00
parent 411cc3a85e
commit 736411b042
1 changed files with 3 additions and 0 deletions

View File

@ -599,8 +599,10 @@ class BarItems(pg.GraphicsObject):
self._pi.removeItem(self)
curve, ds = self.get_ds_line(ds=0)
last_curve = self._ds_line
assert last_curve is curve
self._pi.addItem(curve)
curve.show()
curve.update()
@ -619,6 +621,7 @@ class BarItems(pg.GraphicsObject):
last_curve = self._ds_line
assert last_curve is curve
curve.hide()
curve.clear()
self._pi.removeItem(curve)
# XXX: is this actually any faster?