Use mode name setter throughout

fsp_feeds
Tyler Goodlet 2021-07-24 16:07:04 -04:00
parent 00ff0e96cd
commit e8e9e20124
2 changed files with 4 additions and 5 deletions

View File

@ -456,7 +456,7 @@ class ChartPlotWidget(pg.PlotWidget):
_l1_labels: L1Labels = None
mode_name: str = 'mode: view'
mode_name: str = 'view'
# TODO: can take a ``background`` color setting - maybe there's
# a better one?

View File

@ -206,8 +206,7 @@ async def handle_viewmode_inputs(
view.mode.set_exec(action)
prefix = trigger_mode + '-' if action != 'alert' else ''
view._chart.window().mode_label.setText(
f'mode: {prefix}{action}')
view._chart.window().set_mode_name(f'{prefix}{action}')
else: # none active
@ -221,7 +220,7 @@ async def handle_viewmode_inputs(
if view.hasFocus():
# update mode label
view._chart.window().mode_label.setText('mode: view')
view._chart.window().set_mode_name('view')
view.order_mode = False
@ -239,7 +238,7 @@ class ChartView(ViewBox):
- zoom on right-click-n-drag to cursor position
'''
mode_name: str = 'mode: view'
mode_name: str = 'view'
def __init__(
self,