From a8b425e1e82516434c942bf15014aef29fc5c53a Mon Sep 17 00:00:00 2001 From: jbellister-slac Date: Fri, 4 Nov 2022 11:40:28 -0700 Subject: [PATCH] FIX: Clear out the bars set on the archiver plot when clearCurves() is called --- pydm/widgets/archiver_time_plot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pydm/widgets/archiver_time_plot.py b/pydm/widgets/archiver_time_plot.py index c051525b4..63848d7b4 100644 --- a/pydm/widgets/archiver_time_plot.py +++ b/pydm/widgets/archiver_time_plot.py @@ -329,6 +329,14 @@ def setTimeSpan(self, value): return self._time_span = value + def clearCurves(self) -> None: + """ Clear all curves from the plot """ + for curve in self._curves: + # Need to clear out any bars from optimized data, then super() can handle the rest + if not curve.error_bar_needs_set: + curve.getViewBox().removeItem(curve.error_bar_item) + super().clearCurves() + def getCurves(self) -> List[str]: """ Dump and return the current list of curves and each curve's settings into a list