diff options
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 9c0788bf6..a64e0cb39 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1457,7 +1457,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void OpenPreviewWindow()
{
- if (!string.IsNullOrEmpty(this.CurrentTask.Source))
+ if (!string.IsNullOrEmpty(this.CurrentTask.Source) && !this.StaticPreviewViewModel.IsOpen)
{
this.StaticPreviewViewModel.IsOpen = true;
this.StaticPreviewViewModel.UpdatePreviewFrame(this.CurrentTask, this.ScannedSource);
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index 7989cd85a..d8ad6e9b9 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -525,7 +525,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void Close()
{
- this.TryClose();
+ this.IsOpen = false;
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml index 48323b259..6f1b54694 100644 --- a/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml +++ b/win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml @@ -9,6 +9,7 @@ mc:Ignorable="d" SizeToContent="WidthAndHeight"
TextOptions.TextFormattingMode="Display"
WindowStartupLocation="CenterScreen"
+ cal:Message.Attach="[Event Closing] = [Action Close]"
Title="{Binding Title}">
<Window.Resources>
|