2

I am developing a QGIS plugin that allows me to draw QgsPoints on a vector layer. When drawing, I toggle QGIS's edit mode. In some cases, the last drawn point needs to be deleted. In order to do this, I need to retrieve the feature id of the last drawn feature while the edit mode is toggled.

Unhappily, I am unable to do so. I've been searching for a solution and found nothing so far :

In order to draw, I've developed a FeatureDrawingPoint class, inheriting from QgsMapTool. I draw on a QgsRubberBand that does not give me any access to the ID of the feature I'm drawing.

Any ideas?

2

1 Answer 1

0

This post is a duplicate to this post : How to find the id of the last added feature using pyQGIS?

The answer is the exact same one. Very sorry!

Not the answer you're looking for? Browse other questions tagged or ask your own question.