mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 14:25:16 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user