diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 16 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/FiltersView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/VideoView.xaml | 2 |
3 files changed, 8 insertions, 12 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;
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml index 5f080ea22..b3aeecd95 100644 --- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml @@ -94,7 +94,7 @@ <StackPanel Orientation="Horizontal" Visibility="{Binding ShowDenoiseTune, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="Tune: " Margin="5,0,5,0" />
<ComboBox ItemsSource="{Binding DenoiseTunes}" SelectedItem="{Binding SelectedDenoiseTune}" MinWidth="100"
- Visibility="{Binding ShowDenoiseTunes, Converter={StaticResource boolToVisConverter}}" VerticalAlignment="Center" />
+ Visibility="{Binding ShowDenoiseTune, Converter={StaticResource boolToVisConverter}}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}">
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 0de805316..99a589aa4 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -119,7 +119,7 @@ </StackPanel>
<!-- H264 settings -->
- <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0,10,0,0" Visibility="{Binding DisplayH264Options, Converter={StaticResource boolToVisConverter}}">
+ <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0,10,0,0" Visibility="{Binding DisplayOptimiseOptions, Converter={StaticResource boolToVisConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
|