Skip to content

Commit 097694b

Browse files
author
gcontreras
committedJun 15, 2009
Fix for ticket #936, Legend name too long when executing "qgis vectorfile.shp"
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10934 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3648,7 +3648,8 @@ bool QgisApp::openLayer( const QString & fileName )
36483648
if ( QgsRasterLayer::isValidRasterFileName( fileName ) )
36493649
ok = addRasterLayer( fileName, fileInfo.completeBaseName() );
36503650
else // nope - try to load it as a shape/ogr
3651-
ok = addVectorLayer( fileName, fileName, "ogr" );
3651+
ok = addVectorLayer( fileName, fileInfo.completeBaseName(), "ogr" );
3652+
36523653
CPLPopErrorHandler();
36533654

36543655
if ( !ok )
@@ -4963,9 +4964,9 @@ QgsVectorLayer* QgisApp::addVectorLayer( QString vectorLayerPath, QString baseNa
49634964
QgsDebugMsg( "Creating new vector layer using " + vectorLayerPath
49644965
+ " with baseName of " + baseName
49654966
+ " and providerKey of " + providerKey );
4966-
4967-
layer = new QgsVectorLayer( vectorLayerPath, baseName, providerKey );
4968-
4967+
4968+
layer = new QgsVectorLayer( vectorLayerPath, baseName, providerKey );
4969+
49694970
if ( layer && layer->isValid() )
49704971
{
49714972
// Register this layer with the layers registry

0 commit comments

Comments
 (0)
Please sign in to comment.