[Qgis-developer] should legends be shown for invisible layers ?
Sandro Santilli
strk at keybit.net
Mon Dec 15 07:21:46 PST 2014
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 order words, shouldn't QgsWmsProvider::getLegendGraphic guard
after mGetLegendGraphicReply being already set and refuse to override
it ?
Also, what's the QImage returned by that function, if it is supposed to
be waiting for a response ?
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the Qgis-developer
mailing list