From 736411b04284dbb0c859e925d7c8caba6a9de23b Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 24 Mar 2022 13:29:45 -0400 Subject: [PATCH] Clear ds line graphics on switch back to bars --- piker/ui/_ohlc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/piker/ui/_ohlc.py b/piker/ui/_ohlc.py index c6dbf67c..3887b9ba 100644 --- a/piker/ui/_ohlc.py +++ b/piker/ui/_ohlc.py @@ -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?