Hi Martin,
I filled a ticket [1] and attached a patch to fix it too ;)

Cheers.

[1] https://trac.osgeo.org/qgis/ticket/3157

On Mon, Oct 25, 2010 at 4:00 PM, Giuseppe Sucameli <[email protected]>wrote:

> Hi Martin,
> sorry for this reply so late.
>
> On Thu, Oct 7, 2010 at 11:04 PM, Martin Dobias <[email protected]>wrote:
>
>> Hi Giuseppe
>>
>> On Tue, Oct 5, 2010 at 1:12 AM, Giuseppe Sucameli <[email protected]>
>> wrote:
>> > Hi devs,
>> >
>> > there is a way to load an editable layer without editing capabilities?
>> > I searched for a setCapabilities() method, but nothing.
>> > Reducing the layer capabilities would be useful, especially for plugins,
>> > obviously
>> > without adding new capabilities.
>> >
>> > In a C++ plugin I can extend the concrete DataProvider class.
>> > There is a way to do the same thing in a python plugin? Maybe creating a
>> > wrapper
>> > to the layer dataProvider?
>>
>> I am not aware of such functionality. But it would be possible to add
>> a pair of methods setReadOnly(bool) and isReadOnly() for the layers.
>> If set as read only, editing would be disabled.
>>
> I think this would be a nice feature for pyplugins developers.
>
> In this moment the only workaround to make a layer uneditable is creating a
>
> plugin window containing a new canvas, then adding the layer in this new
> canvas,
> but you can neither use useful tools (e.g all the newest selection tools)
> or qgis
> mainwindow capabilities (add layers, move layers, ...).
>
> I'm going to open a ticket on trac.
>
> Cheers.
>
> --
> Giuseppe Sucameli
>



-- 
Giuseppe Sucameli
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to