#1644 closed bug (fixed)
QgsVectorLayer/Python: Vector layer has no display name
Reported by: | cmoe | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Data Provider | Version: | Trunk |
Keywords: | python; QgsVectorLayer | Cc: | |
Must Fix for Release: | Yes | Platform: | RedHat |
Platform Version: | Awaiting user input: | no |
Description
If i'm loading a postgis layer with python, like
uri = QgsDataSourceURI() uri.setConnection('host','port','mydb','public','') uri.setDataSource('public','foo','wkb_geometry','') layer = QgsVectorLayer(uri.uri(),'bar','postgres') QgsMapLayerRegistry.instance().addMapLayer(layer);
the new layer has no display name in the legend and its properties (print layer.name() has also no output). If i'm setting the name by using layer.setLayerName('bar'), the name is there, but it would be cool, if the constructor sets the name itsself like before.
It works for raster data and it works also if i'm using the postgis connector tool.
regards
Cédric
Note:
See TracTickets
for help on using tickets.
fixed in r10605