From cf2f001bcc5695a618f00d44c197fb4147ba16ea Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 13 Mar 2021 21:06:49 -0500 Subject: [PATCH] Add save last datum toggle to y-label --- piker/ui/_axes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/piker/ui/_axes.py b/piker/ui/_axes.py index c70578d5..72de9f48 100644 --- a/piker/ui/_axes.py +++ b/piker/ui/_axes.py @@ -438,12 +438,15 @@ class YAxisLabel(AxisLabel): self, index: int, value: float, + _save_last: bool = True, ) -> None: """Update the label's text contents **and** position from a view box coordinate datum. """ - self._last_datum = (index, value) + if _save_last: + self._last_datum = (index, value) + self.update_label( self._chart.mapFromView(QPointF(index, value)), value