Use normal pen when last-datum color not provided
parent
731eb91a58
commit
81b8cd5461
|
@ -85,7 +85,7 @@ class FlowGraphic(pg.GraphicsObject):
|
||||||
|
|
||||||
# line styling
|
# line styling
|
||||||
color: str = 'bracket',
|
color: str = 'bracket',
|
||||||
last_step_color: str = 'original',
|
last_step_color: str | None = None,
|
||||||
fill_color: Optional[str] = None,
|
fill_color: Optional[str] = None,
|
||||||
style: str = 'solid',
|
style: str = 'solid',
|
||||||
|
|
||||||
|
@ -126,10 +126,17 @@ class FlowGraphic(pg.GraphicsObject):
|
||||||
)
|
)
|
||||||
|
|
||||||
# last segment is drawn in 2px thickness for emphasis
|
# last segment is drawn in 2px thickness for emphasis
|
||||||
self.last_step_pen = pg.mkPen(
|
if last_step_color:
|
||||||
hcolor(last_step_color),
|
self.last_step_pen = pg.mkPen(
|
||||||
width=2,
|
hcolor(last_step_color),
|
||||||
)
|
width=2,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.last_step_pen = pg.mkPen(
|
||||||
|
self._pen,
|
||||||
|
width=2,
|
||||||
|
)
|
||||||
|
|
||||||
self._last_line: QLineF = QLineF()
|
self._last_line: QLineF = QLineF()
|
||||||
|
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue