summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-05 20:33:55 +0000
committersr55 <[email protected]>2015-01-05 20:33:55 +0000
commit7faa75a3f684470aaaf52d03fce46a55426c6c53 (patch)
tree89bfdf0af07f0e0049b3770a0240cfa972763c8d /win/CS/HandBrakeWPF
parentd9b030c21a0b104fb85400d9fc1526e6dc31acc0 (diff)
WinGui: Further fixes to libhb json api filters code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6686 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs9
-rw-r--r--win/CS/HandBrakeWPF/Views/FiltersView.xaml8
2 files changed, 11 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
index 0b2af3464..e71dbea24 100644
--- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
@@ -14,7 +14,6 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
- using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Services.Scan.Model;
@@ -240,6 +239,8 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.SelectedDeInterlace);
+ if (value != Deinterlace.Custom) this.CustomDeinterlace = string.Empty;
+
// Show / Hide the Custom Control
this.ShowDeinterlaceCustom = this.CurrentTask.Deinterlace == Deinterlace.Custom;
this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);
@@ -271,6 +272,8 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.SelectedDecomb);
+ if (value != Decomb.Custom) this.CustomDecomb = string.Empty;
+
// Show / Hide the Custom Control
this.ShowDecombCustom = this.CurrentTask.Decomb == Decomb.Custom;
this.NotifyOfPropertyChange(() => this.ShowDecombCustom);
@@ -325,6 +328,7 @@ namespace HandBrakeWPF.ViewModels
// Show / Hide the Custom Control
this.ShowDetelecineCustom = this.CurrentTask.Detelecine == Detelecine.Custom;
+ if (value != Detelecine.Custom) this.CustomDetelecine = string.Empty;
this.NotifyOfPropertyChange(() => this.ShowDetelecineCustom);
}
}
@@ -360,7 +364,7 @@ namespace HandBrakeWPF.ViewModels
}
set
{
- if (!object.Equals(this.isDeinterlaceMode, value))
+ if (!Equals(this.isDeinterlaceMode, value))
{
this.isDeinterlaceMode = value;
this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);
@@ -420,6 +424,7 @@ namespace HandBrakeWPF.ViewModels
// Show / Hide the Custom Control
this.ShowDenoiseCustom = this.CurrentTask.Denoise == Denoise.hqdn3d && this.CurrentTask.DenoisePreset == DenoisePreset.Custom;
+ if (value != DenoisePreset.Custom) this.CustomDenoise = string.Empty;
this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);
this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);
this.NotifyOfPropertyChange(() => this.ShowDenoiseTune);
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
index 70488d5da..5f080ea22 100644
--- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
@@ -48,7 +48,7 @@
<ComboBox Width="120" Grid.Row="0" ItemsSource="{Binding DetelecineOptions, Converter={StaticResource boolComboConverter}}"
SelectedItem="{Binding SelectedDetelecine, Converter={StaticResource boolComboConverter}}" Grid.Column="1" Margin="0,0,0,10"
HorizontalAlignment="Left"/>
- <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine}" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left"
Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>
<TextBlock Text="{Binding DeinterlaceControlText}" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10" VerticalAlignment="Top"/>
@@ -67,10 +67,10 @@
Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" />
</StackPanel>
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDecomb}" VerticalAlignment="Top" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDecomb, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"
Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" />
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDeinterlace}" VerticalAlignment="Top" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDeinterlace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"
Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" />
<TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
@@ -99,7 +99,7 @@
<StackPanel Orientation="Horizontal" Visibility="{Binding ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="Custom: " Margin="5,0,5,0" />
- <TextBox Width="120" Margin="0" Text="{Binding CustomDenoise}" VerticalAlignment="Center" />
+ <TextBox Width="120" Margin="0" Text="{Binding CustomDenoise, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>