diff options
author | sr55 <[email protected]> | 2019-10-02 19:09:08 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-10-02 19:09:24 +0100 |
commit | e0d3c0fde733a37186fd9276a26f4d0f3215217e (patch) | |
tree | b5b015f87f607e8c397d3dffe8bbcd8d2b066aa6 | |
parent | 4986fd54995d4c315049b9ec0ecf47ebc1e4a3b8 (diff) |
WinGui: Fix crash on Audio Defaults View. Fixes #2341
-rw-r--r-- | win/CS/HandBrakeWPF/Utilities/SystemInfo.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs | 5 |
3 files changed, 2 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs b/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs index be7c1827b..ca32b7af4 100644 --- a/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs +++ b/win/CS/HandBrakeWPF/Utilities/SystemInfo.cs @@ -82,7 +82,6 @@ namespace HandBrakeWPF.Utilities foreach (PropertyData pc in share.Properties) { - Console.WriteLine(pc.Name + ": " + pc.Value); if (!string.IsNullOrEmpty(pc.Name) && pc.Value != null) { if (pc.Name.Equals("DriverVersion")) version = pc.Value.ToString(); diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index b901e805e..ab49f09c2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -307,10 +307,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void EditAudioDefaults()
{
- AudioDefaultsView view = new AudioDefaultsView();
- view.DataContext = this.audioDefaultsViewModel;
-
- if (view.ShowDialog() == true)
+ if (this.windowManager.ShowDialog(this.audioDefaultsViewModel) == true)
{
this.Preset.AudioTrackBehaviours = this.audioDefaultsViewModel.AudioBehaviours.Clone();
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index d33cf5ea3..39a1a224a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -226,10 +226,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void ShowAudioDefaults()
{
- AudioDefaultsView view = new AudioDefaultsView();
- view.DataContext = this.AudioDefaultsViewModel;
-
- if (view.ShowDialog() == true)
+ if (this.windowManager.ShowDialog(this.AudioDefaultsViewModel) == true)
{
this.OnTabStatusChanged(null);
}
|