> > The layer name can be stored in subLayers() for conveniency, since it has >> usually a short life. And for subLayers() / askUserForOGRSublayers() make >> the layer id what is used. > > subLayers is not used when read from a project, only when a new source is added.
> >> Not sure to what you are refering too, since I can see the layerName >> returned here: > > Between subLayers() and QgsOgrProvider the data runs through other functions in other classes - in one the layername is removed void QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer ) Q_FOREACH ( const QgsSublayersDialog::LayerDefinition& def, chooseSublayersDialog.selection() ) { QString layerGeometryType = def.type; - QString composedURI = uri + "|layerid=" + QString::number( def.layerId ); - + QString composedURI = uri + "|layerid=" + QString::number( def.layerId ) + "|layername=" + def.layerName;
_______________________________________________ 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