summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-12-14 21:00:21 +0000
committersr55 <[email protected]>2018-12-14 21:00:21 +0000
commit1d0bd43191921d01b2d4d69fa0b04fecf9c2c555 (patch)
tree2287271747e91ee5677180a2c5bf68c1553e737d /win
parent591fa3ab6b24409c2a515a7a8dc28ed071deefac (diff)
WinGui: Focus the preview window when the button is pressed while it is still open.
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index a64e0cb39..367318080 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1463,6 +1463,11 @@ namespace HandBrakeWPF.ViewModels
this.StaticPreviewViewModel.UpdatePreviewFrame(this.CurrentTask, this.ScannedSource);
this.windowManager.ShowWindow(this.StaticPreviewViewModel);
}
+ else if (this.StaticPreviewViewModel.IsOpen)
+ {
+ Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(StaticPreviewView));
+ window?.Focus();
+ }
}
public void ShowPresetPane()