Port to new `._position.Nav` apis in order mode
parent
a786df65de
commit
6b93eedcda
|
@ -217,7 +217,7 @@ async def handle_viewmode_kb_inputs(
|
||||||
if order_keys_pressed:
|
if order_keys_pressed:
|
||||||
|
|
||||||
# show the pp size label
|
# show the pp size label
|
||||||
order_mode.current_pp.show()
|
order_mode.current_pp.nav.show()
|
||||||
|
|
||||||
# TODO: show pp config mini-params in status bar widget
|
# TODO: show pp config mini-params in status bar widget
|
||||||
# mode.pp_config.show()
|
# mode.pp_config.show()
|
||||||
|
@ -277,7 +277,7 @@ async def handle_viewmode_kb_inputs(
|
||||||
else: # none active
|
else: # none active
|
||||||
|
|
||||||
# hide pp label
|
# hide pp label
|
||||||
order_mode.current_pp.hide_info()
|
order_mode.current_pp.nav.hide_info()
|
||||||
|
|
||||||
# if none are pressed, remove "staged" level
|
# if none are pressed, remove "staged" level
|
||||||
# line under cursor position
|
# line under cursor position
|
||||||
|
|
|
@ -733,11 +733,11 @@ async def open_order_mode(
|
||||||
)
|
)
|
||||||
|
|
||||||
pp_tracker = PositionTracker(
|
pp_tracker = PositionTracker(
|
||||||
chart,
|
[chart, hist_chart],
|
||||||
alloc,
|
alloc,
|
||||||
startup_pp
|
startup_pp
|
||||||
)
|
)
|
||||||
pp_tracker.hide()
|
pp_tracker.nav.hide()
|
||||||
trackers[account_name] = pp_tracker
|
trackers[account_name] = pp_tracker
|
||||||
|
|
||||||
assert pp_tracker.startup_pp.size == pp_tracker.live_pp.size
|
assert pp_tracker.startup_pp.size == pp_tracker.live_pp.size
|
||||||
|
@ -749,8 +749,8 @@ async def open_order_mode(
|
||||||
|
|
||||||
# on existing position, show pp tracking graphics
|
# on existing position, show pp tracking graphics
|
||||||
if pp_tracker.startup_pp.size != 0:
|
if pp_tracker.startup_pp.size != 0:
|
||||||
pp_tracker.show()
|
pp_tracker.nav.show()
|
||||||
pp_tracker.hide_info()
|
pp_tracker.nav.hide_info()
|
||||||
|
|
||||||
# setup order mode sidepane widgets
|
# setup order mode sidepane widgets
|
||||||
form: FieldsForm = chart.sidepane
|
form: FieldsForm = chart.sidepane
|
||||||
|
@ -810,8 +810,8 @@ async def open_order_mode(
|
||||||
# select a pp to track
|
# select a pp to track
|
||||||
tracker: PositionTracker = trackers[pp_account]
|
tracker: PositionTracker = trackers[pp_account]
|
||||||
mode.current_pp = tracker
|
mode.current_pp = tracker
|
||||||
tracker.show()
|
tracker.nav.show()
|
||||||
tracker.hide_info()
|
tracker.nav.hide_info()
|
||||||
|
|
||||||
# XXX: would love to not have to do this separate from edit
|
# XXX: would love to not have to do this separate from edit
|
||||||
# fields (which are done in an async loop - see below)
|
# fields (which are done in an async loop - see below)
|
||||||
|
|
Loading…
Reference in New Issue