Hi Martin, <br>I filled a ticket [1] and attached a patch to fix it too ;)<br><br>Cheers.<br><br>[1] <a href="https://trac.osgeo.org/qgis/ticket/3157">https://trac.osgeo.org/qgis/ticket/3157</a><br><br><div class="gmail_quote">
On Mon, Oct 25, 2010 at 4:00 PM, Giuseppe Sucameli <span dir="ltr"><<a href="mailto:brush.tyler@gmail.com">brush.tyler@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Martin, <br>sorry for this reply so late.<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Thu, Oct 7, 2010 at 11:04 PM, Martin Dobias <span dir="ltr"><<a href="http://wonder.sk" target="_blank">wonder.sk</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Giuseppe<br>
<div><br>
On Tue, Oct 5, 2010 at 1:12 AM, Giuseppe Sucameli <<a href="mailto:brush.tyler@gmail.com" target="_blank">brush.tyler@gmail.com</a>> wrote:<br>
> Hi devs,<br>
><br>
> there is a way to load an editable layer without editing capabilities?<br>
> I searched for a setCapabilities() method, but nothing.<br>
> Reducing the layer capabilities would be useful, especially for plugins,<br>
> obviously<br>
> without adding new capabilities.<br>
><br>
> In a C++ plugin I can extend the concrete DataProvider class.<br>
> There is a way to do the same thing in a python plugin? Maybe creating a<br>
> wrapper<br>
> to the layer dataProvider?<br>
<br>
</div>I am not aware of such functionality. But it would be possible to add<br>
a pair of methods setReadOnly(bool) and isReadOnly() for the layers.<br>
If set as read only, editing would be disabled.<br></blockquote></div></div><div>I think this would be a nice feature for pyplugins developers.<br><br>In this moment the only workaround to make a layer uneditable is creating a <br>
plugin window containing a new canvas, then adding the layer in this new canvas, <br>
but you can neither use useful tools (e.g all the newest selection tools) or qgis <br>mainwindow capabilities (add layers, move layers, ...).<br><br>I'm going to open a ticket on trac.<br><br>Cheers.<br></div></div>
<br>-- <br><font color="#888888">Giuseppe Sucameli<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br>