From 844adf6b12238cda64e4c661aa564594b980dc77 Mon Sep 17 00:00:00 2001 From: Scott Date: Wed, 10 Feb 2016 20:31:34 +0000 Subject: [PATCH] WinGui: WebOptimised and iPod 5G support checkboxes were not displaying the correct value on preset reload. --- .../HandBrakeWPF/ViewModels/MainViewModel.cs | 39 ++++++++++++++++++- win/CS/HandBrakeWPF/Views/MainView.xaml | 4 +- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index ce9f9a04b..994ca3733 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -375,10 +375,12 @@ namespace HandBrakeWPF.ViewModels if (this.SelectedPreset != null) { // Main Window Settings - this.CurrentTask.OptimizeMP4 = selectedPreset.Task.OptimizeMP4; - this.CurrentTask.IPod5GSupport = selectedPreset.Task.IPod5GSupport; + this.OptimizeMP4 = selectedPreset.Task.OptimizeMP4; + this.IPod5GSupport = selectedPreset.Task.IPod5GSupport; this.SelectedOutputFormat = selectedPreset.Task.OutputFormat; + this.NotifyOfPropertyChange("Task.OptimizeMP4"); + // Tab Settings this.PictureSettingsViewModel.SetPreset(this.SelectedPreset, this.CurrentTask); this.VideoViewModel.SetPreset(this.SelectedPreset, this.CurrentTask); @@ -1028,6 +1030,39 @@ namespace HandBrakeWPF.ViewModels } } + public bool OptimizeMP4 + { + get + { + return this.CurrentTask.OptimizeMP4; + } + set + { + if (value == this.CurrentTask.OptimizeMP4) + { + return; + } + this.CurrentTask.OptimizeMP4 = value; + this.NotifyOfPropertyChange(() => this.OptimizeMP4); + } + } + + public bool IPod5GSupport + { + get + { + return this.CurrentTask.IPod5GSupport; + } + set + { + if (value == this.CurrentTask.IPod5GSupport) + { + return; + } + this.CurrentTask.IPod5GSupport = value; + this.NotifyOfPropertyChange(() => this.IPod5GSupport); + } + } #endregion #region Load and Shutdown Handling diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index ad875db87..c7fdc167c 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -484,7 +484,7 @@ Margin="8,0,0,0" VerticalAlignment="Center" Content="Web Optimized" - IsChecked="{Binding Path=CurrentTask.OptimizeMP4}" + IsChecked="{Binding Path=OptimizeMP4}" Visibility="{Binding IsMkv, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" @@ -493,7 +493,7 @@ Margin="8,0,0,0" VerticalAlignment="Center" Content="iPod 5G Support" - IsChecked="{Binding Path=CurrentTask.IPod5GSupport}" + IsChecked="{Binding Path=IPod5GSupport}" Visibility="{Binding IsMkv, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" -- 2.40.0