Class: QgsVectorLayerUndoPassthroughCommand

class qgis.core.QgsVectorLayerUndoPassthroughCommand(buffer: QgsVectorLayerEditBuffer, text: str, autocreate: bool = True)

Bases: QgsVectorLayerUndoCommand

Constructor for QgsVectorLayerUndoPassthroughCommand

Parameters
  • buffer (QgsVectorLayerEditBuffer) – associated edit buffer

  • text (str) – text associated with command

  • autocreate (bool = True) – flag allowing to automatically create a savepoint if necessary

Undo command for vector layer in transaction group mode.

Methods

errorMessage

Returns the error message or an empty string if there’s none.

hasError

Returns error status

rollBackToSavePoint

Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call

setError

Set error flag and append “failed” to text

setErrorMessage

Sets the error message.

setSavePoint

Set the command savepoint or set error status.

errorMessage(self) → str

Returns the error message or an empty string if there’s none.

New in version 3.0.

Return type

str

hasError(self) → bool

Returns error status

Return type

bool

rollBackToSavePoint(self) → bool

Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call

Return type

bool

setError(self)

Set error flag and append “failed” to text

setErrorMessage(self, errorMessage: str)

Sets the error message.

New in version 3.0.

Parameters

errorMessage (str) –

setSavePoint(self, savePointId: str = '') → bool

Set the command savepoint or set error status. Error satus should be false prior to call. If the savepoint given in parameter is empty, then a new one is created if none is currently available in the transaction.

Parameters

savePointId (str = '') –

Return type

bool