Started bondgraph library
This commit is contained in:
BIN
lib/bondgraph.beb
Normal file
BIN
lib/bondgraph.beb
Normal file
Binary file not shown.
25
lib/icons/Sf.icon.json
Normal file
25
lib/icons/Sf.icon.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"shapes": {
|
||||
"f1a38ee1-8a53-454d-a398-12c14032ba79": {
|
||||
"layer": 0,
|
||||
"type": "text",
|
||||
"pos": [
|
||||
-48,
|
||||
-32
|
||||
],
|
||||
"width": 96.0,
|
||||
"height": 64.0,
|
||||
"color": "#000000ff",
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"size": 64.0,
|
||||
"text": "Sf"
|
||||
}
|
||||
},
|
||||
"port_positions": {
|
||||
"856b4152-e18f-46d7-889d-626cb98474aa": [
|
||||
-8,
|
||||
-8
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user