[Qgis-developer] apply a cloned renderer to replicate styling
giohappy at gmail.com
Tue Nov 27 10:15:39 PST 2012
I've done it programmatically, passing the renderer clone (V2 or not) to
the other layer, updating the legendlayer and refreshing the canvas. I
suppose those actions will trigger a similar flow of things.
In my case it wouldn't be enough because I should avoid changing the
activeLayer. In my method I pass the layer reference...
thanks anyway, because it's a useful GUI tool ;)
2012/11/27 Larry Shaffer <larrys at dakotacarto.com>
> Hi Giovanni,
> On Tue, Nov 27, 2012 at 3:26 AM, G. Allegri <giohappy at gmail.com> wrote:
> > I need to replicate the theming of a vector layer to another one.
> > I thought that cloning the oringinal renderer (being it V2 or not) and
> > applying it to other layer would be enough, but id doesn't have effects.
> > other layer is applied the default (random) styling.
> > Probably I've misunderstood the renderer mechanism. How should one
> > to obtain it?
> I just exposed QgisApp's mActionCopyStyle and mActionPasteStyle to
> QgisInterface . Is this what you are looking for (in Python)?
> iface.setActiveLayer( someQgsMapLayer )
> iface.setActiveLayer( someotherQgsMapLayer )
> > giovanni
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer