From cc2943494f70119fff85f9f987e533dca0b8cfd1 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Thu, 22 Aug 2019 08:19:04 -0500 Subject: [PATCH] working bids/asks are often empty, yet we launch blank OB window on errant clicks in these cells; link CanExexute to text not empty --- src/client/spark/Modules/Market/MarketView/MarketViewRow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs b/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs index 2cb3efe52..0636af825 100644 --- a/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs +++ b/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs @@ -78,12 +78,12 @@ namespace mbts.spark { bid_merged_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.BidMergedSize)); bid_direct_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.BidDirectSize)); bid_implied_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.BidImpliedSize)); - working_bids_click = new DelegateCommand(() => _show_order_book(MarketViewView.Columns.WorkingBids)); + working_bids_click = new DelegateCommand(() => _show_order_book(MarketViewView.Columns.WorkingBids), () => working_bids_text != string.Empty); ask_price_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.Ask)); ask_merged_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.AskMergedSize)); ask_direct_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.AskDirectSize)); ask_implied_size_click = new DelegateCommand(() => _show_order_ticket(MarketViewView.Columns.AskImpliedSize)); - working_asks_click = new DelegateCommand(() => _show_order_book(MarketViewView.Columns.WorkingAsks)); + working_asks_click = new DelegateCommand(() => _show_order_book(MarketViewView.Columns.WorkingAsks), () => working_asks_text != string.Empty); _animation.AnimationsChanged += on_animations_changed; void on_animations_changed() => RaisePropertyChanged(nameof(animations)); _dispose = Disposable.Create(