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/qgis@10916 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gcontreras
gcontreras committed Jun 12, 2009
1 parent 497758d commit 37fe59692a9f90abd0064e217396cb40328c81d3
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 37fe596

Please sign in to comment.
You can’t perform that action at this time.