From 8627f6f6c5f4d870f5a6d539270b5fd1a34d5fee Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 14 Mar 2022 06:04:18 -0400 Subject: [PATCH] Add no-path guard now that we can use a poly --- piker/ui/_curve.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/piker/ui/_curve.py b/piker/ui/_curve.py index 7c83129b..63c14159 100644 --- a/piker/ui/_curve.py +++ b/piker/ui/_curve.py @@ -466,9 +466,8 @@ class FastAppendCurve(pg.GraphicsObject): ) -> None: profiler = pg.debug.Profiler( - # disabled=False, #not pg_profile_enabled(), + disabled=not pg_profile_enabled(), ) - # p.setRenderHint(p.Antialiasing, True) if ( self._step_mode @@ -486,13 +485,14 @@ class FastAppendCurve(pg.GraphicsObject): profiler('.drawLine()') p.setPen(self._pen) - # else: + path = self.path if self._use_poly: assert self.poly p.drawPolyline(self.poly) profiler('.drawPolyline()') - else: - p.drawPath(self.path) + + elif path: + p.drawPath(path) profiler('.drawPath()') # TODO: try out new work from `pyqtgraph` main which should