Skip to content

Commit eccf365

Browse files
committed
WinGui: Fix an issue where the audio encoder may not display correctly after a queue has been imported and queue item edited. This may exhibit in other scenarios as well. Should fix HandBrake#6524
1 parent 4d33a12 commit eccf365

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

win/CS/HandBrake.Interop/Interop/Interfaces/Model/Encoders/HBAudioEncoder.cs

+30
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,35 @@ public bool IsLosslessEncoder
152152
return this.ShortName.Contains("flac"); // TODO Find a better way to do this.
153153
}
154154
}
155+
156+
protected bool Equals(HBAudioEncoder other)
157+
{
158+
return this.ShortName == other.ShortName;
159+
}
160+
161+
public override bool Equals(object obj)
162+
{
163+
if (ReferenceEquals(null, obj))
164+
{
165+
return false;
166+
}
167+
168+
if (ReferenceEquals(this, obj))
169+
{
170+
return true;
171+
}
172+
173+
if (obj.GetType() != this.GetType())
174+
{
175+
return false;
176+
}
177+
178+
return Equals((HBAudioEncoder)obj);
179+
}
180+
181+
public override int GetHashCode()
182+
{
183+
return (this.ShortName != null ? this.ShortName.GetHashCode() : 0);
184+
}
155185
}
156186
}

0 commit comments

Comments
 (0)