grapa.shared.command_recorder.Command

class grapa.shared.command_recorder.Command(who: List[Action], redo: Action, undo: Action, tag_special: str = '')

Bases: object

A command contains a subject, and do and undo Actions.

__init__(who: List[Action], redo: Action, undo: Action, tag_special: str = '')

Methods

__init__(who, redo, undo[, tag_special])

is_end_transaction([new_tag])

returns True if Command was tagged as end of a transaction

is_null()

returns True if Command has no effect

redo(cr)

Perform the actions recorded in the command.

undo(cr)

Undo the actions recorded in the command.

Attributes

ACTION_NULL

is_end_transaction(new_tag: bool | None = None)

returns True if Command was tagged as end of a transaction

is_null()

returns True if Command has no effect

redo(cr: CommandRecorderBase)

Perform the actions recorded in the command.

undo(cr: CommandRecorderBase)

Undo the actions recorded in the command.