diff options
author | sr55 <[email protected]> | 2015-02-07 16:36:25 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-02-07 16:36:25 +0000 |
commit | 753beb7d5c3b4de3d237d9e43b00e3e237bc8b36 (patch) | |
tree | 746a4cd0f72f3ba5f22f315c145963b61d56538e /win | |
parent | f9d51a06728fd37a9f06ef0086ff8ba4c4fdf418 (diff) |
WinGui: Fix an issue related to the Audio and Subtitle defaults not reloading/storing correctly when updating presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6878 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs | 51 |
3 files changed, 55 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs index e6bb5a398..6ffd45db1 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs @@ -10,6 +10,7 @@ namespace HandBrakeWPF.Model.Audio
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -46,7 +47,7 @@ namespace HandBrakeWPF.Model.Audio public AudioBehaviours(AudioBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.SelectedBehaviour;
- this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges);
+ this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs index 8bf58fb60..8570f00e7 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs @@ -10,6 +10,7 @@ namespace HandBrakeWPF.Model.Subtitles
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -56,7 +57,7 @@ namespace HandBrakeWPF.Model.Subtitles public SubtitleBehaviours(SubtitleBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.selectedBehaviour;
- this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);
+ this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges.ToList());
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs index 0f18c5b86..6f1da9c99 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs @@ -150,5 +150,56 @@ namespace HandBrakeWPF.Services.Presets.Model }
#endregion
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="other">
+ /// The other.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ protected bool Equals(Preset other)
+ {
+ return string.Equals(this.Name, other.Name);
+ }
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="obj">
+ /// The obj.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+ return Equals((Preset)obj);
+ }
+
+ /// <summary>
+ /// The get hash code.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="int"/>.
+ /// </returns>
+ public override int GetHashCode()
+ {
+ return (this.Name != null ? this.Name.GetHashCode() : 0);
+ }
}
}
\ No newline at end of file |