diff options
author | sr55 <[email protected]> | 2015-01-22 17:27:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-22 17:27:42 +0000 |
commit | 209c9273e7af434cc2fbae0c0b3f6df4915deea3 (patch) | |
tree | 6a69d9784bb22a501ae46113420d285843985727 /win | |
parent | c5e37a65bdc7facc356d505b79c4f2b290bcf246 (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')
-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" />
|