Clear ds line graphics on switch back to bars
parent
411cc3a85e
commit
736411b042
|
@ -599,8 +599,10 @@ class BarItems(pg.GraphicsObject):
|
||||||
self._pi.removeItem(self)
|
self._pi.removeItem(self)
|
||||||
|
|
||||||
curve, ds = self.get_ds_line(ds=0)
|
curve, ds = self.get_ds_line(ds=0)
|
||||||
|
|
||||||
last_curve = self._ds_line
|
last_curve = self._ds_line
|
||||||
assert last_curve is curve
|
assert last_curve is curve
|
||||||
|
|
||||||
self._pi.addItem(curve)
|
self._pi.addItem(curve)
|
||||||
curve.show()
|
curve.show()
|
||||||
curve.update()
|
curve.update()
|
||||||
|
@ -619,6 +621,7 @@ class BarItems(pg.GraphicsObject):
|
||||||
last_curve = self._ds_line
|
last_curve = self._ds_line
|
||||||
assert last_curve is curve
|
assert last_curve is curve
|
||||||
curve.hide()
|
curve.hide()
|
||||||
|
curve.clear()
|
||||||
self._pi.removeItem(curve)
|
self._pi.removeItem(curve)
|
||||||
|
|
||||||
# XXX: is this actually any faster?
|
# XXX: is this actually any faster?
|
||||||
|
|
Loading…
Reference in New Issue