mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Network: Add add node command.
This commit is contained in:
1 parent
a44dc91ae9
commit
bc209f78f6
3 files changed
+38
-9
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user