Skip to content

Commit

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

git-svn-id: http://svn.osgeo.org/qgis/trunk@10934 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gcontreras committed Jun 15, 2009
1 parent d11af26 commit 1d9b648
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
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 1d9b648

Please sign in to comment.