Hi,
is there a pyqgis solution to fetch the features that are canceled with
"delete selected features" tool?
I used this code in "Project Properties --> Macro":
layer = iface.activeLayer()
layer.committedFeaturesRemoved.connect(ConfirmTratDeleted)
def ConfirmTratDeleted(layer,fids):
for fid in fids:
iter = layer.getFeatures(QgsFeatureRequest().setFilterFid(fid))
feat = iter.next()
geometry = feat.geometry()
but it returned thi error:
An error has occured while executing Python code:
Traceback (most recent call last):
File "", line 234, in ConfirmTratDeleted
StopIteration
I suppose because the features are committed and don't exist anymore.
Somebody can help me to understand how to get features that were deleted?
Thank you in advance
Enrico
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer