Skip to content

UndoRedoService

Canonical path: NemAll_Python_IFW_Input.UndoRedoService

Implementation of the undo/redo service

ActivateCollectedElementsForFinishUpdate

ActivateCollectedElementsForFinishUpdate()

activate collected elements from undo step, important for next finish update

CollectElementsForMultipleTransactions

CollectElementsForMultipleTransactions()

Collect the elements for adding multiple transactions to one undo step

CreateUndoStep overloaded

CreateUndoStep(eventID: int)

Create an undo step

Parameters:

  • eventID (int) –

    Event ID of the undo step

CreateUndoStep()

Create an undo step

IsInUndoService staticmethod

IsInUndoService() -> bool

Check if an active undo service is present

Returns:

  • bool

    Active undo service is present

ResetTransactionError

ResetTransactionError()

Reset the transaction error

SetUndoDescription

SetUndoDescription(textID: int)

Set the undo step description independent from menu event text

Parameters:

  • textID (int) –

    Text ID of the undo step

SetUndoStepEvent

SetUndoStepEvent(eventID: int)

Set the undo step event

Parameters:

  • eventID (int) –

    Event ID of the undo step

__init__ overloaded

__init__(
    doc: DocumentAdapter,
    isPassivateAll: bool = False,
    isLockPreviewDraw: bool = False,
    collectEleForMultipleTransactions: bool = False,
)

Constructor

Parameters:

  • doc (DocumentAdapter) –

    Current document

  • isPassivateAll (bool, default: False ) –

    if true passivate all, default is false

  • isLockPreviewDraw (bool, default: False ) –

    Lock the preview drawing during the undo step creation

  • collectEleForMultipleTransactions (bool, default: False ) –

    Collect the elements, if the UndoRedoService is included in multiple transactions

__init__(element: UndoRedoService)

Copy constructor

Parameters:

Placeholder