Class: QgsVectorLayerUndoPassthroughCommandChangeAttributes¶
- class qgis.core.QgsVectorLayerUndoPassthroughCommandChangeAttributes(buffer: QgsVectorLayerEditBuffer, fid: int, newValues: Dict[int, Any], oldValues: Dict[int, Any] = {})¶
Bases:
QgsVectorLayerUndoPassthroughCommand
Constructor for QgsVectorLayerUndoPassthroughCommandChangeAttributes
- Parameters
buffer – associated edit buffer
fid – feature ID of feature
newValues – New values for attributes
oldValues – Old values for attributes
Undo command for changing attributes’ values from a vector layer in transaction group.
Methods
Returns the error message or an empty string if there’s none.
Rollback command, release savepoint or set error status save point must be set prior to call error satus should be
False
prior to callSet error flag and append “failed” to text
Sets the error message.
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.
- 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.
New in version 3.0.
- 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)¶