[Qgis-developer] Duplicate Layer(s) - request for additional help

Larry Shaffer larrys at dakotacarto.com
Sat Nov 3 09:24:37 PDT 2012


Hi,

On Sat, Nov 3, 2012 at 7:45 AM, Tim Sutton <lists at linfiniti.com> wrote:
> Hi
>
> On Fri, Nov 2, 2012 at 11:48 PM, Larry Shaffer <larrys at dakotacarto.com> wrote:
>> Hi,
>>
>> Yesterday I added a new layer action 'Duplicate Layer(s),' based off
>> of some Python code from Giuseppe Sucameli [1]. It works well for
>> generic Vector and Raster layers. However, I have reached the edge of
>> my knowledge and experience with other layers from different data
>> providers. IMHO, while the action is useable enough to include in a
>> release, it currently throws an error when used on any layer it
>> doesn't currently support, but should support duplication of as many
>> layer/provider types as is reasonable.
>>
>> I'm fairly busy on some other projects and am requesting that any devs
>> with knowledge on how to duplicate the following layer types please
>> add such features to the QgisApp::duplicateLayers() method [2] if you
>> have the inclination and time:
>>
>> - Memory Layers
>> - Plugin Layers
>> - Other provider types not based off of a simple source URI and pasted
>> layer style
>>
>> If you can help out, thanks,
>>
>
> My opinion: If you are able to disable the duplicate layer option
> based on context I think it would be fine to include it in master
> already.

I looked at disabling (greying) the action when an incompatible layer
was selected, but opted to allow the action to work on multiple layers
instead. I will add more helpful info to the 'unsupported layer'
dialog so users understand which layer was not duplicated and why,
until further layer support can be added.

I'll also add more checks, which won't produce a dialog, like when
only a group is selected. Also, I'll look at disabling when single
unsupported legend items are selected. It's already in master, along
with a sip binding via iface ( actionDuplicateLayer() ).

Regards,

Larry


> Regards
>
> Tim
>
>> Larry
>>
>> [0] http://hub.qgis.org/issues/5899
>> [1] https://github.com/qgis/Quantum-GIS/blob/master/src/app/qgisapp.cpp#L5347
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> ==============================================
> Please do not email me off-list with technical
> support questions. Using the lists will gain
> more exposure for your issues and the knowledge
> surrounding your issue will be shared with all.
>
> Visit http://linfiniti.com to find out about:
>  * QGIS programming and support services
>  * Mapserver and PostGIS based hosting plans
>  * FOSS Consulting Services
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> ==============================================


More information about the Qgis-developer mailing list