[Qgis-developer] should legends be shown for invisible layers ?

Sandro Santilli strk at keybit.net
Mon Dec 15 09:07:24 PST 2014

On Mon, Dec 15, 2014 at 04:21:46PM +0100, Sandro Santilli wrote:
> On Mon, Dec 15, 2014 at 02:24:27PM +0100, Sandro Santilli wrote:
> > On Mon, Dec 15, 2014 at 06:56:39PM +0700, Martin Dobias wrote:
> > > I'm not sure I like the fact that QgsMapSettings would be passed when
> > > legend nodes are created. I guess with invalidateMapBasedData() having
> > > QgsMapSettings pointer that would not be necessary.
> > 
> > If we want ::data() to lazily load the legend, there will be a need to
> > store the "last used map settings" anyway. Unless we leave all the caching
> > to the single layer (rather than to each of the layertree nodes).
> I'm testing this lazy load of legend from QgsWMSLegendNode::data but
> experiencing memory errors due to what looks like fragility of the
> QgsWmsProvider::getLegendGraphic method. In particular, calling that
> method again while the old one did not get to a complete response
> from server seems to put it in an unusable state, eventually getting
> to segfaults. Does it make sense ?

In case you can/want take a look, I've pushed the lazy loading test code
here: https://github.com/strk/QGIS/tree/wmslegend-node


 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  

More information about the Qgis-developer mailing list