> > - go back to read-only mode when the user exists the edition mode (this
> > would need a new method in the QgsVectorDataProvider API to warn about
> > that, since the provider has currently no way of knowing that)
> 
> Thank you for taking care of that.
> 
> Could you elaborate on the last item ? Does it mean adding something
> like beginEdit() / endEdit() on QgsVectorDataProvider ?

Yes

> Is it an API break 

API extension I'd say. The default implementation would be {}.

> and if not how does it work for existing code that
> does not call begin/end edit ?

From what I can see in QgsVectorLayer, you cannot call addFeature(), 
addFeatures(), changeAttributeValue(), deleteFeature(), deleteFeatures(), 
etc.. if there's no mEditBuffer active. And the only way to have one active is 
to call startEditing() before. So unless I'm missing something, it doesn't 
look like you can do changes to a dataset without doing them between 
startEditing() and commitChanges()/rollBack()


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to