Start with causality inference
This commit is contained in:
@@ -311,24 +311,21 @@ class DeleteSelectionCommand(QUndoCommand):
|
||||
owner_id: str | None,
|
||||
blocks: dict[str, Component],
|
||||
connections: dict[str, Connection],
|
||||
inputs: list[Port],
|
||||
outputs: list[Port],
|
||||
ports: list[Port],
|
||||
) -> None:
|
||||
super().__init__("Delete selection")
|
||||
self.controller = controller
|
||||
self.owner_id = owner_id
|
||||
self.blocks = blocks
|
||||
self.connections = connections
|
||||
self.inputs = inputs
|
||||
self.outputs = outputs
|
||||
self.ports = ports
|
||||
|
||||
def redo(self) -> None:
|
||||
self.controller._delete_items(
|
||||
self.owner_id,
|
||||
set(self.blocks),
|
||||
set(self.connections),
|
||||
{port.id for port in self.inputs},
|
||||
{port.id for port in self.outputs},
|
||||
{port.id for port in self.ports},
|
||||
)
|
||||
|
||||
def undo(self) -> None:
|
||||
@@ -336,8 +333,7 @@ class DeleteSelectionCommand(QUndoCommand):
|
||||
self.owner_id,
|
||||
self.blocks,
|
||||
self.connections,
|
||||
self.inputs,
|
||||
self.outputs,
|
||||
self.ports,
|
||||
)
|
||||
|
||||
|
||||
@@ -361,7 +357,6 @@ class PasteSelectionCommand(QUndoCommand):
|
||||
self.blocks,
|
||||
self.connections,
|
||||
[],
|
||||
[],
|
||||
)
|
||||
|
||||
def undo(self) -> None:
|
||||
@@ -370,7 +365,6 @@ class PasteSelectionCommand(QUndoCommand):
|
||||
set(self.blocks),
|
||||
set(self.connections),
|
||||
set(),
|
||||
set(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user