From bb93cf4944cea5a412274719d0cbcccd30ca3175 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 20 Mar 2018 14:57:40 -0400 Subject: [PATCH] SPARK-687 Create Synthetic dialog does not update Name field if 'Enter' is pressed... --- .../Modules/Spreader/ExecutionStrategyEditor.xaml | 10 +++++++++- .../spark/Modules/Spreader/VM/SyntheticEditorVM.cs | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/client/spark/Modules/Spreader/ExecutionStrategyEditor.xaml b/src/client/spark/Modules/Spreader/ExecutionStrategyEditor.xaml index 3d271d54e..ad1b5a8bc 100644 --- a/src/client/spark/Modules/Spreader/ExecutionStrategyEditor.xaml +++ b/src/client/spark/Modules/Spreader/ExecutionStrategyEditor.xaml @@ -350,7 +350,15 @@ + > + + + + + + + + /// The view model designed to serve as the DataContext for the SyntheticEditorView /// - partial class SyntheticEditorVM : ViewModelBaseWithValidation, IRequestViewClose, IDisposable { + partial class SyntheticEditorVM : ViewModelBaseWithValidation, IRequestViewClose, IRequestBindingSourceUpdate, IDisposable { readonly ObservableCollection _available_tick_factors = new ObservableCollection(TickUtils.all_present_ticks()); readonly QuantityModel _quantity_model; readonly PriceMultiplierModel _price_mult_model; @@ -73,6 +73,7 @@ namespace mbts.spark { }; remove_leg = new DelegateCommand(s => leg_tuples.removeFirst(l => l.leg.Security.Id == s.Id)); commit = new DelegateCommand(async () => { + RequestUpdate?.Invoke(); bool valid = true; if (string.IsNullOrWhiteSpace(name)) { flash_error_msg("Please enter a name", SparkUtils.UI.MessageFlashDuration, nameof(name)).ignore(); @@ -189,6 +190,7 @@ namespace mbts.spark { } public event EventHandler RequestClose; + public event Action RequestUpdate; public string title { get; } public ImageSource icon { get; }