summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-02-08 14:41:10 +0000
committersr55 <[email protected]>2015-02-08 14:41:10 +0000
commit73e58d54b7b73637a3534c4fb0fd82ebc6b4e197 (patch)
tree8070927f5c78cd4b18fe0531ff0895dda0c66b4a
parente5323157303148d548cd4b59842df8ef419d0b98 (diff)
[Merge 0.10.x] 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/branches/0.10.x@6880 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Preset.cs51
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs3
3 files changed, 55 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
index 4363ec56d..83b724972 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
@@ -10,6 +10,7 @@
namespace HandBrake.ApplicationServices.Model.Audio
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -46,7 +47,7 @@ namespace HandBrake.ApplicationServices.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/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
index 2bddd75aa..de07ae48d 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
@@ -146,5 +146,56 @@ namespace HandBrake.ApplicationServices.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
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
index c96357c3b..d944100db 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
@@ -10,6 +10,7 @@
namespace HandBrake.ApplicationServices.Model.Subtitle
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -56,7 +57,7 @@ namespace HandBrake.ApplicationServices.Model.Subtitle
public SubtitleBehaviours(SubtitleBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.selectedBehaviour;
- this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);
+ this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges.ToList());
}
/// <summary>