Started bondgraph library

This commit is contained in:
2026-08-02 12:10:08 +02:00
parent c8373c3423
commit dfff760cc1
3 changed files with 26 additions and 1 deletions

View File

@@ -159,7 +159,7 @@ class DocumentTreeModel(QAbstractItemModel):
root.children.append(document_root)
def _list_children(root: DocumentTreeNode, components: dict[ComponentID, Component]) -> None:
for component_id, component in components.items():
for component_id, component in sorted(components.items(), key=lambda item: (item[1].name.casefold(), item[1].name, str(item[0]))):
component_node = DocumentTreeNode(name=component.name, value=component, component_id=component_id, parent=root, children=[])
root.children.append(component_node)
self._component_nodes[component_id] = component_node