schrodinger.application.msv.command module

class schrodinger.application.msv.command.Command(redo, undo, description, command_id=-1)

Bases: PyQt5.QtWidgets.QUndoCommand

id()
redo()
undo()
schrodinger.application.msv.command.compress_command(*args, **kwds)

Enables compression of commands on undo stack, so they can be revoked using a single undo call.

Parameters:
  • stack (QUndoStack) – Undo stack to compress commands on.
  • description (str) – Description of the compressed command.
schrodinger.application.msv.command.do_command(meth)

Decorates a method returning a command object, validates the command (in DEBUG mode only), and pushes it onto the command stack if there is one or calls redo if there isn’t.

schrodinger.application.msv.command.from_command_only(meth)

When running in DEBUG mode, enforces the requirement that the decorated method only be called from a command object