Bug report #1644

QgsVectorLayer/Python: Vector layer has no display name

Added by cmoe - about 15 years ago. Updated almost 15 years ago.

Assignee:nobody -
Category:Data Provider
Affected QGIS version: Regression?:No
Operating System:RedHat Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11704


If i'm loading a postgis layer with python, like

uri = [[QgsDataSourceURI]]()
layer = [[QgsVectorLayer]](uri.uri(),'bar','postgres')

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.



Associated revisions

Revision 4ac3e654
Added by Jürgen Fischer about 15 years ago

fix #1644

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10605 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision d72d5abc
Added by Jürgen Fischer about 15 years ago

fix #1644

git-svn-id: http://svn.osgeo.org/qgis/trunk@10605 c8812cc2-4d05-0410-92ff-de0c093fc19c


#1 Updated by Jürgen Fischer about 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in

#2 Updated by Anonymous almost 15 years ago

Milestone Version 1.1.0 deleted

Also available in: Atom PDF