[Qgis-developer] PyQGIS: Problems with the layerWasAdded SIGNAL

Germán Carrillo carrillo.german at gmail.com
Tue Jun 16 11:44:42 EDT 2009


Well, I thought this order would do those things:

        self.layers.remove( i )
        QgsMapLayerRegistry.instance().removeMapLayer(
i.layer().getLayerID() )
        self.canvas.setLayerSet( self.layers )

Anyway, I did the two lines swap and get the segmentation fault again.

Germán

El 16 de junio de 2009 10:04, Martin Dobias <wonder.sk at gmail.com> escribió:

> 2009/6/16 Germán Carrillo <carrillo.german at gmail.com>:
> > Thanks Martin, but I remove the layer from the layerSet before removing
> from
> > QgsMapLayerRegistry. So, when I update the layer set in canvas, the layer
> > doesn't exists.
>
> From your code I see you only remove the layer from the self.layers
> dictionary. But canvas (resp. map renderer class) still thinks that
> the layer exists.
>
> Martin
>



-- 
-----------
  |\__
(:>__)(
  |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090616/58f12c9b/attachment.html


More information about the Qgis-developer mailing list