From 16dfc75ad08e8af4c620945d63ce31861bff21d4 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 13 Jan 2022 16:05:05 -0500 Subject: [PATCH] Add guard for "last step" rect --- piker/ui/_curve.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/piker/ui/_curve.py b/piker/ui/_curve.py index 161332d5..15b19f76 100644 --- a/piker/ui/_curve.py +++ b/piker/ui/_curve.py @@ -328,8 +328,10 @@ class FastAppendCurve(pg.PlotCurveItem): profiler = pg.debug.Profiler(disabled=not pg_profile_enabled()) # p.setRenderHint(p.Antialiasing, True) - if self._step_mode: - + if ( + self._step_mode + and self._last_step_rect + ): brush = self.opts['brush'] # p.drawLines(*tuple(filter(bool, self._last_step_lines))) # p.drawRect(self._last_step_rect)