[Qgis-developer] Remove editing functions from QgsVectorLayer

Nathan Woodrow madmanwoo at gmail.com
Mon Apr 15 15:53:55 PDT 2013

What would be the API calls in order to add a new feature to a layer and
commit the result?

- Nathan

On Tue, Apr 16, 2013 at 8:29 AM, Martin Dobias <wonder.sk at gmail.com> wrote:

> Hi
> right now, all the basic vector layer editing operations are
> implemented within QgsVectorLayerEditBuffer class and the "advanced"
> operations (composed of one or more basic operations) are implemented
> in QgsVectorLayerEditUtils class. The main class, QgsVectorLayer still
> contains editing functions and only proxies them to these new classes.
> I think we should probably remove those editing functions from
> QgsVectorLayer. The advantage should be two-fold:
> 1. fewer functions -> easier to grasp and understand the class
> 2. sometimes people try to call editing functions without editing mode
> being turned on: these issues should go away since they would quickly
> find out that QgsVectorLayerEditBuffer does not exist if editing is
> not turned on.
> From the editing functions we would keep only startEditing(),
> commitChanges(), commitErrors(), rollback() as they take care of edit
> buffer management. The rest of the functions (addFeatures(),
> changeGeometry() etc) would go to /dev/null.
> Any comments / suggestions / objections?
> Regards
> Martin
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130416/e25012f0/attachment.html>

More information about the Qgis-developer mailing list