From f06e05c9cb223acab98b6de500940d2d6c3ef5fa Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 21 Jul 2021 20:00:57 -0400 Subject: [PATCH] Switch mode to touch `.pp` --- piker/ui/_interaction.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 89cc9474..286783cf 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -172,6 +172,10 @@ async def handle_viewmode_inputs( }.intersection(pressed) if order_keys_pressed: + + # show the pp label + mode.pp.show() + if ( # 's' for "submit" to activate "live" order Qt.Key_S in pressed or @@ -204,6 +208,10 @@ async def handle_viewmode_inputs( f'mode: {prefix}{action}') else: # none active + + # hide pp label + mode.pp.hide() + # if none are pressed, remove "staged" level # line under cursor position view.mode.lines.unstage_line() @@ -231,9 +239,10 @@ class ChartView(ViewBox): mode_name: str = 'mode: view' def __init__( - self, + name: str, + parent: pg.PlotItem = None, **kwargs, @@ -250,7 +259,6 @@ class ChartView(ViewBox): self.select_box = SelectRect(self) self.addItem(self.select_box, ignoreBounds=True) - self.name = name self.mode = None self.order_mode: bool = False @@ -259,6 +267,7 @@ class ChartView(ViewBox): @asynccontextmanager async def open_async_input_handler( self, + ) -> 'ChartView': from . import _event