Use mode name setter throughout
parent
5c58d0b5fc
commit
9c07db368d
|
@ -456,7 +456,7 @@ class ChartPlotWidget(pg.PlotWidget):
|
||||||
|
|
||||||
_l1_labels: L1Labels = None
|
_l1_labels: L1Labels = None
|
||||||
|
|
||||||
mode_name: str = 'mode: view'
|
mode_name: str = 'view'
|
||||||
|
|
||||||
# TODO: can take a ``background`` color setting - maybe there's
|
# TODO: can take a ``background`` color setting - maybe there's
|
||||||
# a better one?
|
# a better one?
|
||||||
|
|
|
@ -206,8 +206,7 @@ async def handle_viewmode_inputs(
|
||||||
view.mode.set_exec(action)
|
view.mode.set_exec(action)
|
||||||
|
|
||||||
prefix = trigger_mode + '-' if action != 'alert' else ''
|
prefix = trigger_mode + '-' if action != 'alert' else ''
|
||||||
view._chart.window().mode_label.setText(
|
view._chart.window().set_mode_name(f'{prefix}{action}')
|
||||||
f'mode: {prefix}{action}')
|
|
||||||
|
|
||||||
else: # none active
|
else: # none active
|
||||||
|
|
||||||
|
@ -221,7 +220,7 @@ async def handle_viewmode_inputs(
|
||||||
|
|
||||||
if view.hasFocus():
|
if view.hasFocus():
|
||||||
# update mode label
|
# update mode label
|
||||||
view._chart.window().mode_label.setText('mode: view')
|
view._chart.window().set_mode_name('view')
|
||||||
|
|
||||||
view.order_mode = False
|
view.order_mode = False
|
||||||
|
|
||||||
|
@ -239,7 +238,7 @@ class ChartView(ViewBox):
|
||||||
- zoom on right-click-n-drag to cursor position
|
- zoom on right-click-n-drag to cursor position
|
||||||
|
|
||||||
'''
|
'''
|
||||||
mode_name: str = 'mode: view'
|
mode_name: str = 'view'
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Reference in New Issue