PR suggestion - One RaisePropertyChanged call FTW!

This commit is contained in:
Jake Norbut committed 2019-04-11 10:10:12 -05:00
1 parent 992d56303c
commit 51db2e75f7
1 file changed
+1 -2
@@ -283,13 +283,12 @@ namespace mbts.spark {
updated?.Invoke((old_order_tuple, order_tuple));
// terminal state
if (old_order_tuple.order.is_non_terminal() != order_tuple.order.is_non_terminal()) {
RaisePropertyChanged(nameof(is_non_terminal));
// while we call refresh_is_at/detachable in the OrderBookRowCollection.update
// on all the children of a modified row, we used to not call it on the row istelf,
// which should of course be done here. This manifested via the very top parent in any
// length of attachable orders *still* showing an attach icon after some descendant was
// detached
RaisePropertyChanged(nameof(is_attachable), nameof(is_detachable));
RaisePropertyChanged(nameof(is_non_terminal), nameof(is_attachable), nameof(is_detachable));
// this will update the cancel column in the mini ob
cancel_command.TryRaiseCanExecuteChanged();