[Qgis-developer] Removing layers in QGIS

Martin Dobias wonder.sk at gmail.com
Sun Mar 19 12:01:03 EST 2006


Hi Marco,

recently I've found out that removing layer has 2 different
implementations - one in QgsLegend, another in QgisApp (this one even
doesn't work correctly). I wanted to fix that with using
QgsLegend::removeLayer(), but I've found inconsistency: in QgisApp,
layer is erased from map layer registry, while in QgsLegend this is
not happening.

My question is - what is the policy of using map layer registry (who
is responsible for adding/removing from it etc.). This would be good
to decide, also with regard to possibility to have multiple map
canvases or embedding canvas and legend to other projects.

Regards,
Martin



More information about the Qgis-developer mailing list