Changed the way hardware nodes are inserted into the GUI tree view. The new code should keep the order (as enumerated by the parent) for hardware of the same type.

This commit is contained in:
Michael Möller
2020-01-30 23:08:49 +01:00
parent 5b34d265b6
commit 5f9532ceb8

View File

@@ -435,7 +435,7 @@ namespace OpenHardwareMonitor.GUI {
private void InsertSorted(Collection<Node> nodes, HardwareNode node) {
int i = 0;
while (i < nodes.Count && nodes[i] is HardwareNode &&
((HardwareNode)nodes[i]).Hardware.HardwareType <
((HardwareNode)nodes[i]).Hardware.HardwareType <=
node.Hardware.HardwareType)
i++;
nodes.Insert(i, node);