Revert "tweaking row_vm attach/detach commands to be bulk-operation aware"

This reverts commit a34cd44967.
This commit is contained in:
Jake Norbut committed 2019-04-09 11:28:20 -05:00
1 parent a34cd44967
commit bb9b934ef4
1 file changed
+3 -17
@@ -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();
})
);