Network: Add add node command.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-06-08 16:39:08 +02:00
1 parent a44dc91ae9
commit bc209f78f6
3 files changed
+38 -9

No files matched your search

+6 -1
View File
@@ -376,7 +376,12 @@ class GraphWidget(QGraphicsView):
Returns:
Nothing
"""
node = self.graph.add_node(pos.x(), pos.y())
node = self.graph.create_node(pos.x(), pos.y())
self._undo.push(
AddNodeCommand(
self.graph, node
)
)
inode = NodeItem(node, self)
self.scene().addItem(inode)
self.node_items.append(inode)