Fixed some hardware sorting issue in the gadget. Hardware with the same type and name would be added to the same section.

This commit is contained in:
Michael Möller
2010-09-13 22:55:25 +00:00
parent 53cc1cc75a
commit 56ce10022a
2 changed files with 3 additions and 3 deletions

View File

@@ -486,7 +486,7 @@ namespace OpenHardwareMonitor.GUI {
if (x.HardwareType != y.HardwareType)
return x.HardwareType.CompareTo(y.HardwareType);
return x.Name.CompareTo(y.Name);
return x.Identifier.CompareTo(y.Identifier);
}
}
}

View File

@@ -101,8 +101,8 @@ namespace OpenHardwareMonitor.Hardware {
}
public static bool operator ==(Identifier id1, Identifier id2) {
if (id1 == null)
return id2 == null;
if (id1.Equals(null))
return id2.Equals(null);
else
return id1.Equals(id2);
}