From 41b0c11aaa5d5ffd976bb151d45f1ca0e91e2b7f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 23 Sep 2022 17:16:48 -0400 Subject: [PATCH] Hide existing level line markers on startup --- piker/ui/_annotate.py | 1 - piker/ui/_editors.py | 1 + piker/ui/order_mode.py | 5 ++++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/piker/ui/_annotate.py b/piker/ui/_annotate.py index 8c555f64..32a67980 100644 --- a/piker/ui/_annotate.py +++ b/piker/ui/_annotate.py @@ -167,7 +167,6 @@ class LevelMarker(QGraphicsPathItem): ''' level = self.get_level() - view = self.chart.getViewBox() vr = view.state['viewRange'] ymn, ymx = vr[1] diff --git a/piker/ui/_editors.py b/piker/ui/_editors.py index cc89fb78..2633cf40 100644 --- a/piker/ui/_editors.py +++ b/piker/ui/_editors.py @@ -183,6 +183,7 @@ class LineEditor(Struct): if lines: for line in lines: line.show_labels() + line.hide_markers() log.debug(f'Level active for level: {line.value()}') # TODO: other flashy things to indicate the order is active diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 72571d90..d2196b69 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -237,7 +237,7 @@ class OrderMode: lines: list[LevelLine] = [] for chart, kwargs in [ (self.chart, {}), - (self.hist_chart, {'only_show_markers_on_hover': False}), + (self.hist_chart, {'only_show_markers_on_hover': True}), ]: kwargs.update(line_kwargs) line = self.line_from_order( @@ -304,13 +304,16 @@ class OrderMode: order, chart=chart, show_markers=True, + # just for the stage line to avoid # flickering while moving the cursor # around where it might trigger highlight # then non-highlight depending on sensitivity always_show_labels=True, + # don't highlight the "staging" line highlight_on_hover=False, + # prevent flickering of marker while moving/tracking cursor only_show_markers_on_hover=False, )