[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-developer
Subject:    Re: [Qgis-developer] apply a cloned renderer to replicate styling
From:       "G. Allegri" <giohappy () gmail ! com>
Date:       2012-11-28 11:32:49
Message-ID: CAB4g1=xumKjFT8UGE2sJu_1x0=MF+XUh7nvjvbiO+UhOk0_L5Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Giuseppe,
I didn't reply to myself again, but I already found that answer, and it was
right :)
I also need to do a mapCanvas refresh.

I think that a signal should be emitted when e renderer is assigned to a
layer, and the QgsLegend should listen to it to refresh itself
automatically. Don't you think?

giovanni

2012/11/28 Giuseppe Sucameli <sucameli@faunalia.it>

> Hi Giovanni,
>
> On Tue, Nov 27, 2012 at 11:30 AM, G. Allegri <giohappy@gmail.com> wrote:
> > If I pan/zoom I see
> > the new renderer is being used, though the legend is'n updated.
>
> you can update it using
> iface.legendInterface().refreshLayerSymbology( layer )
>
> Cheers.
>
> >
> > giovanni
> >
> > 2012/11/27 G. Allegri <giohappy@gmail.com>
> >
> >> 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. The
> >> other layer is applied the default (random) styling.
> >> Probably I've misunderstood the renderer mechanism. How should one
> procede
> >> to obtain it?
> >>
> >> giovanni
> >
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
>
>
>
> --
> Giuseppe Sucameli - Faunalia
>

[Attachment #5 (text/html)]

Thanks Giuseppe,<div>I didn&#39;t reply to myself again, but I already found that \
answer, and it was right :)</div><div>I also need to do a mapCanvas \
refresh.</div><div><br></div><div>I think that a signal should be emitted when e \
renderer is assigned to a layer, and the QgsLegend should listen to it to refresh \
itself automatically. Don&#39;t you think?</div> \
<div><br></div><div>giovanni<br><br><div class="gmail_quote">2012/11/28 Giuseppe \
Sucameli <span dir="ltr">&lt;<a href="mailto:sucameli@faunalia.it" \
target="_blank">sucameli@faunalia.it</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hi Giovanni,<br>
<br>
On Tue, Nov 27, 2012 at 11:30 AM, G. Allegri &lt;<a \
href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>&gt; wrote:<br> &gt; If I \
pan/zoom I see<br> &gt; the new renderer is being used, though the legend is&#39;n \
updated.<br> <br>
you can update it using<br>
iface.legendInterface().refreshLayerSymbology( layer )<br>
<br>
Cheers.<br>
<br>
&gt;<br>
&gt; giovanni<br>
&gt;<br>
&gt; 2012/11/27 G. Allegri &lt;<a \
href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>&gt;<br> &gt;<br>
&gt;&gt; I need to replicate the theming of a vector layer to another one.<br>
&gt;&gt; I thought that cloning the oringinal renderer (being it V2 or not) and<br>
&gt;&gt; applying it to other layer would be enough, but id doesn&#39;t have effects. \
The<br> &gt;&gt; other layer is applied the default (random) styling.<br>
&gt;&gt; Probably I&#39;ve misunderstood the renderer mechanism. How should one \
procede<br> &gt;&gt; to obtain it?<br>
&gt;&gt;<br>
&gt;&gt; giovanni<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Qgis-developer mailing list<br>
&gt; <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
 &gt; <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" \
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br> \
&gt;<br> <span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Giuseppe Sucameli - Faunalia<br>
</font></span></blockquote></div><br></div><div><br></div><div><br></div>



_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic