[Qgis-developer] Remove editing functions from QgsVectorLayer
madmanwoo at gmail.com
Tue Apr 16 03:20:32 PDT 2013
More complicated then I thought :)
On Tue, Apr 16, 2013 at 8:01 PM, Jürgen E. <jef at norbit.de> wrote:
> On Tue, 16. Apr 2013 at 19:26:52 +1000, Nathan Woodrow wrote:
> > Personally I'm not a fan of that.
> > Why don't we make startEditing() return a edit buffer/edit session.
> So you
> > could do this:
> > session = layer.editSession()
> > session.addFeature(feature)
> > ...
> > session.commitChanges()
> > This would mean that everyone can keep their own edit buffers and can
> > what they want. Means you could also doing this:
> > with layer.editSession() as session:
> > session.addFeature(...)
> > which will commit the features at the end.
> > - Nathan
> And would would those session interact? Does vector layer render
> that got added in any session and skip everything that was deleted in any
> session? Can stuff added in one session already be removed in an other?
> How would rollback/undo/redo work?
> Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
> Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
> Software Engineer D-26506 Norden
> committ(ed|ing) to Quantum GIS IRC: jef on FreeNode
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer