[QGIS-Developer] QGIS/OGR: FeatureIds reassigned on write to data provider?

Sandro Mani manisandro at gmail.com
Wed Jul 12 02:15:38 PDT 2017



On 12.07.2017 01:06, Nyall Dawson wrote:
>> Thanks for the insight, I'll look at that approach.
>>
>> Sandro
> I might have missed this in the earlier conversation, but why not
> explore the option suggest of using the layer's edit buffer? I believe
> this should automatically handle all the reassignment without any
> changes needed (except flipping the direct dataProvider use to the
> editBuffer).
>
> Possibly it's nicer for users anyway if the fixes made by the plugin
> are buffered and undo-able.
The problem is that if one of the changes to be committed is refused by 
the provider, you're stuck not being able to commit the entire set of 
changes. And, since we are dealing with invalid geometries, it is not 
that unlikely that this occurs. Committing directly to the provider 
ensures that we know immediately whether a change is valid or not.

Sandro



More information about the QGIS-Developer mailing list