From 4afafce297ae09bc1482b382fcc5b49253b57e25 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 14 Sep 2021 12:26:26 -0400 Subject: [PATCH] Update icons from pps at order mode startup --- piker/ui/order_mode.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 3d9941d9..7f169a22 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -665,15 +665,9 @@ async def open_order_mode( ) order_pane.set_accounts(list(trackers.keys())) - # set all entries as unavailable at startup and then fill out - # positions and ready icons - # order_pane.update_accounts_icon('unavailable') - + # update pp icons for name, tracker in trackers.items(): - if tracker.live_pp.size > 0: - order_pane.update_accounts_icon('long_pp', [name]) - elif tracker.live_pp.size < 0: - order_pane.update_accounts_icon('short_pp', [name]) + order_pane.update_account_icons({name: tracker.live_pp}) # top level abstraction which wraps all this crazyness into # a namespace..