MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / undo

Method undo

src/commands/node/basic_operations.py:645–653  ·  view source on GitHub ↗

Move node back to original position.

(self)

Source from the content-addressed store, hash-verified

643 return False
644
645 def undo(self) -> bool:
646 """Move node back to original position."""
647 try:
648 self.node.setPos(self.old_position)
649 self._mark_undone()
650 return True
651 except Exception as e:
652 print(f"Failed to undo node move: {e}")
653 return False
654
655 def can_merge_with(self, other: CommandBase) -> bool:
656 """Check if this move can be merged with another move."""

Callers 1

Calls 1

_mark_undoneMethod · 0.80

Tested by 1