From bb9b934ef41bd19a04886c38e0bc5df55d7daf9c Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Tue, 9 Apr 2019 11:28:20 -0500 Subject: [PATCH] Revert "tweaking row_vm attach/detach commands to be bulk-operation aware" This reverts commit a34cd449677c750200140c5e29bbf0b814a5f823. --- .../Trading/OrderBook/OrderBookRowVM.cs | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs b/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs index e999c1fbe..c0a2533b7 100644 --- a/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs +++ b/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs @@ -204,30 +204,16 @@ namespace mbts.spark { ) ); - // the detach command is bulk-operation aware - // that is, if the OBVM currently has a row selection then - // it will call deselect with selected_rows, - // else it will just pass itself (i.e. the button has been - // pressed w/o making a row selection) public ICommand detach_command => _detach_command ?? (_detach_command = new DelegateCommand(() => { - if (_owner.selected_rows.Count > 0) { - _owner.detach_orders(_owner.selected_rows); - } else { - _owner.detach_orders(this); - } + _owner.detach_orders(this); }) ); - // similar to detach_comamnd, the attach command is bulk-operation - // aware in that if there are already selected rows, it will - // leave them as is, else it will select istself, thereby priming the - // attach_vm, and continuing as on normal with begin_attach_algos public ICommand attach_command => _attach_command ?? ( _attach_command = new DelegateCommand(() => { - if (_owner.selected_rows.Count == 0) { - _select_me(); - } + // the _select me will trigger the OBVM.attach_vm to get primed + _select_me(); _owner.begin_attach_algos(); }) );