Hide existing level line markers on startup

history_view
Tyler Goodlet 2022-09-23 17:16:48 -04:00
parent cc67d23eee
commit 41b0c11aaa
3 changed files with 5 additions and 2 deletions

View File

@ -167,7 +167,6 @@ class LevelMarker(QGraphicsPathItem):
'''
level = self.get_level()
view = self.chart.getViewBox()
vr = view.state['viewRange']
ymn, ymx = vr[1]

View File

@ -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

View File

@ -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,
)