summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index a6ae77489..a22fa83d9 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -906,14 +906,16 @@ namespace HandBrakeWPF.ViewModels
public void OpenPreviewWindow()
{
Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(PreviewView));
+ IPreviewViewModel viewModel = IoC.Get<IPreviewViewModel>();
if (window != null)
{
+ viewModel.Task = this.CurrentTask;
window.Activate();
}
else
{
- IPreviewViewModel viewModel = IoC.Get<IPreviewViewModel>();
+ viewModel.Task = this.CurrentTask;
this.WindowManager.ShowWindow(viewModel);
}
}