[Qgis-developer] Keep track of features in memory provider

Matthias Kuhn matthias.kuhn at gmx.ch
Tue Nov 19 00:30:41 PST 2013


On Die 19 Nov 2013 09:15:55 CET, Jürgen E. Fischer wrote:
> Hi Matthias,
>
> On Mon, 18. Nov 2013 at 20:58:04 +0100, Matthias Kuhn wrote:
>> I think we should rather fix this issue. I would very much like
>> QgsVectorLayer to emit a signal, when it commits the features and
>> changes their ids.
>>
>> QgsVectorLayer::featureIdsChanged( QMap< QgsFeatureId, QgsFeatureId )
>
> Doesn't the layer emit featureDeleted and featureAdded when the id changes
> anymore?

I think it does.
The drawback of the current approach is, that you don't have any 
context and don't know if the feature was really deleted or got a new 
id. Therefore updating a reference to a temporary feature id (in memory 
or inside another layer) with the real feature id is almost impossible.

Matthias

>
>
> Jürgen
>




More information about the Qgis-developer mailing list