> > So if we want to address both we need the layer_id and layer_name. I'd say > when you build a OGR URI (mostly in QgisApp::askUserForOGRSublayers()), > then look at the uniqueness of the layer names. If there's layer name > unicity, then use only the layer name. Otherwise fallback to uniquely the > layer_id (and well in that case if the datasource changes at some point, we > might have an issue indeed)
This is already being done in my version. Setting the id to -1 could tell the QgsOgrProvider that the layername is unique - and remove the need of the extra parameter id >= 0 would tell QgsOgrProvider that the id MUST be used, because there are duplicate layernames. The id and layername will be stored (as it was before) in the URI/Project. Since at this point it is known that the values are valid - no further checks are needed and can be opened directly Can we agree on this? Anything else still open? Mark
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer