:S difficult? layer.startEditing() layer.commitChanges()
On Thu, Jul 12, 2012 at 10:54 PM, chathura silva <[email protected]> wrote: > > hey Its difficult . Is there any simple way to change to edit mode > > > > On Thu, Jul 12, 2012 at 5:41 AM, Richard Duivenvoorde <[email protected]> > wrote: >> >> >> Hi, >> >> ok, this is more clear :-) >> >> You can toggle editing mode of a vector layer via the little crayon button >> or via menu layer/toggle editing >> >> but looking into the code, which I downloaded from >> http://pyqgis.org/repo/contributed/ >> >> it seems to me that after every transformation, the result is 'commited' >> which toggles OFF again the edit mode... >> >> If you feel brave, uncomment line 118 in qgsAffine.py: >> # vlayer.commitChanges() >> >> But maybe Mauricio can update the code for us, and also move his plugin to >> the new repositiry :-) >> >> Regards, >> >> Richard >> >> ps I will send you my .py file offline >> >> >> >> On 07/12/2012 12:25 PM, chathura silva wrote: >>> >>> I try to edit a vector layer using qgisaffine tool. But it says layer is >>> not in editabale mode. how can I cange it to editable mode >>> >>> >>> >>> >>> On Thu, Jul 12, 2012 at 1:27 AM, Richard Duivenvoorde >>> <[email protected] <mailto:[email protected]>> wrote: >>> >>> On 07/12/2012 09:16 AM, chathura silva wrote: >>> >>> Is there any way to change it to editable mode ? >>> >>> >>> Please describe your problem a little more instead of one sentence >>> questions, for others it also costs time to answer your question. >>> >>> If you mean 'is it possible for a python plugin to set a layer in >>> the modus editing' the answer is: >>> >>> yes >>> >>> but I think you also would like to see some pointers (after you >>> tried to google a little ;-) ): >>> >>> Have a look here: >>> >>> >>> http://qgis.org/pyqgis-__cookbook/vector.html#__modifying-vector-layers >>> >>> <http://qgis.org/pyqgis-cookbook/vector.html#modifying-vector-layers> >>> >>> I'm also setting a layer into editing mode, see >>> >>> >>> http://hub.qgis.org/projects/__xytools/repository/revisions/__a249004832f44334f9861483ff9d4d__a08bb91e81/entry/xytools.py >>> >>> >>> <http://hub.qgis.org/projects/xytools/repository/revisions/a249004832f44334f9861483ff9d4da08bb91e81/entry/xytools.py> >>> >>> at line 334 >>> >>> Regards, >>> >>> Richard Duivenvoorde >>> >>> >>> >>> _________________________________________________ >>> Qgis-user mailing list >>> [email protected] <mailto:[email protected]> >>> http://lists.osgeo.org/__mailman/listinfo/qgis-user >>> <http://lists.osgeo.org/mailman/listinfo/qgis-user> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Qgis-user mailing list >>> [email protected] >>> http://lists.osgeo.org/mailman/listinfo/qgis-user >>> >> >> > > > _______________________________________________ > Qgis-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-user > _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
