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 :
- I can iterate on the layer features, but the features coordinates are empty as long as edit mode is toggled.
- I can connect to the adding features signal, but again, the signal is sent only when the edit mode is deactivated.
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?