summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-02-07 16:36:25 +0000
committersr55 <[email protected]>2015-02-07 16:36:25 +0000
commit753beb7d5c3b4de3d237d9e43b00e3e237bc8b36 (patch)
tree746a4cd0f72f3ba5f22f315c145963b61d56538e /win/CS/HandBrakeWPF/Services
parentf9d51a06728fd37a9f06ef0086ff8ba4c4fdf418 (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/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs51
1 files changed, 51 insertions, 0 deletions
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