summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-22 17:27:42 +0000
committersr55 <[email protected]>2015-01-22 17:27:42 +0000
commit209c9273e7af434cc2fbae0c0b3f6df4915deea3 (patch)
tree6a69d9784bb22a501ae46113420d285843985727 /win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
parentc5e37a65bdc7facc356d505b79c4f2b290bcf246 (diff)
WinGui: Fix a few binding errors.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6791 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index a5d03cbb0..28ee07a70 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -58,7 +58,7 @@ namespace HandBrakeWPF.ViewModels
private bool useAdvancedTab;
private bool displayTurboFirstPass;
private int videoPresetMaxValue;
- private int? videoPresetValue;
+ private int videoPresetValue;
private bool displayNonQsvControls;
private VideoTune videoTune;
private bool fastDecode;
@@ -633,7 +633,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Gets or sets the video preset value.
/// </summary>
- public int? VideoPresetValue
+ public int VideoPresetValue
{
get
{
@@ -644,9 +644,9 @@ namespace HandBrakeWPF.ViewModels
this.videoPresetValue = value;
HBVideoEncoder encoder = HandBrakeEncoderHelpers.VideoEncoders.FirstOrDefault(s => s.ShortName == EnumHelper<VideoEncoder>.GetShortName(this.SelectedVideoEncoder));
- if (encoder != null && value.HasValue)
+ if (encoder != null)
{
- string preset = encoder.Presets[value.Value];
+ string preset = encoder.Presets[value];
this.VideoPreset = new VideoPreset(preset, preset);
}
@@ -1226,15 +1226,11 @@ namespace HandBrakeWPF.ViewModels
// Update the Quality Slider. Make sure the bounds are up to date with the users settings.
this.SetQualitySliderBounds();
- if (this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.QuickSync)
- {
- this.DisplayOptimiseOptions = true;
- }
-
- this.DisplayNonQSVControls = this.SelectedVideoEncoder != VideoEncoder.QuickSync;
// Update control display
this.UseAdvancedTab = selectedEncoder != VideoEncoder.QuickSync && this.UseAdvancedTab;
+ this.DisplayOptimiseOptions = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.QuickSync;
+ this.DisplayNonQSVControls = this.SelectedVideoEncoder != VideoEncoder.QuickSync;
this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264;
this.DisplayTuneControls = SelectedVideoEncoder == VideoEncoder.X264;