Class: QgsVectorLayerUndoPassthroughCommandChangeGeometry

class qgis.core.QgsVectorLayerUndoPassthroughCommandChangeGeometry

Bases: QgsVectorLayerUndoPassthroughCommand

Undo command for changing feature geometry from a vector layer in transaction group.

QgsVectorLayerUndoPassthroughCommandChangeGeometry(buffer: QgsVectorLayerEditBuffer, fid: int, geom: QgsGeometry) Constructor for QgsVectorLayerUndoPassthroughCommandChangeGeometry

Parameters:
  • buffer – associated edit buffer

  • fid – feature ID of feature to change

  • geom

    new geometru

    Methods

    errorMessage

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

    id

    rtype:

    int

    mergeWith

    param other:

    redo

    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.

    undo

errorMessage(self) str

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

id(self) int
Return type:

int

mergeWith(self, other: QUndoCommand) bool
Parameters:

other (QUndoCommand) –

Return type:

bool

redo(self)
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

setError(self)

Set error flag and append “failed” to text

setErrorMessage(self, errorMessage: str)

Sets the error message.

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.

undo(self)