From 3053ec908dab32b4da6ce9ec022215087a28a37e Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 4 Feb 2016 19:06:37 +0000 Subject: [PATCH] WinGui: Fix Video Bitrate Text Box not updating correctly with presets. --- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index cbe2726d8..981413a9a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -17,7 +17,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices.Utilities; using HandBrake.ApplicationServices.Interop; using HandBrake.ApplicationServices.Interop.Model.Encoding; @@ -211,9 +210,9 @@ namespace HandBrakeWPF.ViewModels if (value) { this.Task.VideoEncodeRateType = VideoEncodeRateType.ConstantQuality; - this.Task.TwoPass = false; - this.Task.TurboFirstPass = false; - this.Task.VideoBitrate = null; + this.TwoPass = false; + this.TurboFirstPass = false; + this.VideoBitrate = null; this.NotifyOfPropertyChange(() => this.Task); } else @@ -912,7 +911,9 @@ namespace HandBrakeWPF.ViewModels this.TwoPass = preset.Task.TwoPass; this.TurboFirstPass = preset.Task.TurboFirstPass; - this.Task.VideoBitrate = preset.Task.VideoBitrate; + + this.VideoBitrate = preset.Task.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate ? preset.Task.VideoBitrate : null; + this.NotifyOfPropertyChange(() => this.Task); -- 2.40.0