Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for ticket #936, Legend name too long when executing "qgis vector…
…file.shp"

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10934 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gcontreras committed Jun 15, 2009
1 parent 9c6464e commit 097694b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -3648,7 +3648,8 @@ bool QgisApp::openLayer( const QString & fileName )
if ( QgsRasterLayer::isValidRasterFileName( fileName ) )
ok = addRasterLayer( fileName, fileInfo.completeBaseName() );
else // nope - try to load it as a shape/ogr
ok = addVectorLayer( fileName, fileName, "ogr" );
ok = addVectorLayer( fileName, fileInfo.completeBaseName(), "ogr" );

CPLPopErrorHandler();

if ( !ok )
Expand Down Expand Up @@ -4963,9 +4964,9 @@ QgsVectorLayer* QgisApp::addVectorLayer( QString vectorLayerPath, QString baseNa
QgsDebugMsg( "Creating new vector layer using " + vectorLayerPath
+ " with baseName of " + baseName
+ " and providerKey of " + providerKey );

layer = new QgsVectorLayer( vectorLayerPath, baseName, providerKey );

layer = new QgsVectorLayer( vectorLayerPath, baseName, providerKey );
if ( layer && layer->isValid() )
{
// Register this layer with the layers registry
Expand Down

0 comments on commit 097694b

Please sign in to comment.