From e84e5e3c393873e62a458691c4b45844dcda9a61 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 23 Jan 2023 19:28:05 -0500 Subject: [PATCH] Use normal pen when last-datum color not provided --- piker/ui/_curve.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/piker/ui/_curve.py b/piker/ui/_curve.py index 72d61d84..c9ebebcd 100644 --- a/piker/ui/_curve.py +++ b/piker/ui/_curve.py @@ -85,7 +85,7 @@ class FlowGraphic(pg.GraphicsObject): # line styling color: str = 'bracket', - last_step_color: str = 'original', + last_step_color: str | None = None, fill_color: Optional[str] = None, style: str = 'solid', @@ -126,10 +126,17 @@ class FlowGraphic(pg.GraphicsObject): ) # last segment is drawn in 2px thickness for emphasis - self.last_step_pen = pg.mkPen( - hcolor(last_step_color), - width=2, - ) + if last_step_color: + self.last_step_pen = pg.mkPen( + hcolor(last_step_color), + width=2, + ) + else: + self.last_step_pen = pg.mkPen( + self._pen, + width=2, + ) + self._last_line: QLineF = QLineF() super().__init__(*args, **kwargs)