From 5c27cec23216d1cfdbaac7daa9585cdf2e80b7cb Mon Sep 17 00:00:00 2001 From: Chelsea Hughes Date: Tue, 25 Apr 2017 21:11:50 -0700 Subject: [PATCH] Full refresh after extract or publish (for #19) --- src/VBASync.WPF/MainWindow.xaml.cs | 4 ++-- src/VBASync/Model/ActiveSession.cs | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/VBASync.WPF/MainWindow.xaml.cs b/src/VBASync.WPF/MainWindow.xaml.cs index e2ce9aa..eec3317 100644 --- a/src/VBASync.WPF/MainWindow.xaml.cs +++ b/src/VBASync.WPF/MainWindow.xaml.cs @@ -77,9 +77,9 @@ private void ApplyButton_Click(object sender, RoutedEventArgs e) return; } - _vm.ActiveSession.Apply(committedChanges, p => changes.Remove(p)); + _vm.ActiveSession.Apply(committedChanges); - UpdateIncludeAllBox(); + QuietRefreshIfInputsOk(); } private void CancelButton_Click(object sender, RoutedEventArgs e) { diff --git a/src/VBASync/Model/ActiveSession.cs b/src/VBASync/Model/ActiveSession.cs index 4f84cc9..02a5cc1 100644 --- a/src/VBASync/Model/ActiveSession.cs +++ b/src/VBASync/Model/ActiveSession.cs @@ -18,7 +18,7 @@ public ActiveSession(ISession session) public string FolderPath => _vf.FolderPath; - public void Apply(IEnumerable changes, Action onCommitted = null) + public void Apply(IEnumerable changes) { if (_session.Action == ActionType.Extract) { @@ -45,7 +45,6 @@ public void Apply(IEnumerable changes, Action onCommitted = null) } break; } - onCommitted?.Invoke(p); } } else @@ -73,7 +72,6 @@ public void Apply(IEnumerable changes, Action onCommitted = null) } break; } - onCommitted?.Invoke(p); } _vf.Write(_session.FilePath); }