]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix Video Bitrate Text Box not updating correctly with presets.
authorsr55 <sr55.hb@outlook.com>
Thu, 4 Feb 2016 19:06:37 +0000 (19:06 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 4 Feb 2016 19:06:45 +0000 (19:06 +0000)
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs

index cbe2726d867cf231e92647d4d9fb2d81ab2750e9..981413a9a37613608208ca9eea0b44cb539e6d77 100644 (file)
@@ -17,7 +17,6 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.ApplicationServices.Interop;\r
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
 \r
@@ -211,9 +210,9 @@ namespace HandBrakeWPF.ViewModels
                 if (value)\r
                 {\r
                     this.Task.VideoEncodeRateType = VideoEncodeRateType.ConstantQuality;\r
-                    this.Task.TwoPass = false;\r
-                    this.Task.TurboFirstPass = false;\r
-                    this.Task.VideoBitrate = null;\r
+                    this.TwoPass = false;\r
+                    this.TurboFirstPass = false;\r
+                    this.VideoBitrate = null;\r
                     this.NotifyOfPropertyChange(() => this.Task);\r
                 }\r
                 else\r
@@ -912,7 +911,9 @@ namespace HandBrakeWPF.ViewModels
          \r
             this.TwoPass = preset.Task.TwoPass;\r
             this.TurboFirstPass = preset.Task.TurboFirstPass;\r
-            this.Task.VideoBitrate = preset.Task.VideoBitrate;\r
+\r
+            this.VideoBitrate = preset.Task.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate ? preset.Task.VideoBitrate : null;\r
+         \r
 \r
             this.NotifyOfPropertyChange(() => this.Task);\r
 \r