]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix preview window.
authorsr55 <sr55.hb@outlook.com>
Sun, 2 Sep 2012 13:14:56 +0000 (13:14 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 2 Sep 2012 13:14:56 +0000 (13:14 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4928 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index a6ae77489aab4c116832ccdc7a0bc48d6f6a99b3..a22fa83d9a6143aedc7ff04bbbec6f7698bd431f 100644 (file)
@@ -906,14 +906,16 @@ namespace HandBrakeWPF.ViewModels
         public void OpenPreviewWindow()\r
         {\r
             Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(PreviewView));\r
+            IPreviewViewModel viewModel = IoC.Get<IPreviewViewModel>();\r
 \r
             if (window != null)\r
             {\r
+                viewModel.Task = this.CurrentTask;\r
                 window.Activate();\r
             }\r
             else\r
             {\r
-                IPreviewViewModel viewModel = IoC.Get<IPreviewViewModel>();\r
+                viewModel.Task = this.CurrentTask;\r
                 this.WindowManager.ShowWindow(viewModel);\r
             }\r
         }\r