Skip to content
Permalink
Browse files
Fix for ticket #1702, when loading an ogr database datasource with on…
…e layer the password appears in legend.

git-svn-id: http://svn.osgeo.org/qgis/trunk@10916 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gcontreras committed Jun 12, 2009
1 parent 27ad692 commit f112d814f0b5dcac0a79cc721d008d184b8c9256
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/app/qgisapp.cpp
@@ -2399,6 +2399,11 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS
}
else // there is 1 layer of data available
{
//set friendly name for datasources with only one layer
QStringList sublayers = layer->dataProvider()->subLayers();
QString ligne = sublayers.at( 0 );
QStringList elements = ligne.split( ":" );
layer->setLayerName(elements.at(1));
// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer( layer );
// notify the project we've made a change

0 comments on commit f112d81

Please sign in to comment.