Hi List I have not found any function in QgsMapLayer for getting a layer by its name. I needed it on a python plugin to let the user choose a layer from a combo box (already populated with the layer names) So I created this function http://osgeo.pastebin.com/7EpNA3JL
I have some questions regarding it: * Is it the right way ? * I have seen it is possible in Qgis to rename a layer, and 2 layers of the same type can have the same name. This makes my function not working in all the cases (which is my problem of course). Is there a reason to allow layers to share a name ? Thanks for all the work done in Qgis Cheers Kimaidou
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
