Skip to content
Permalink
Browse files

Fix for ticket #936, Legend name too long when executing "qgis vector…

…file.shp"

git-svn-id: http://svn.osgeo.org/qgis/trunk@10934 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gcontreras
gcontreras committed Jun 15, 2009
1 parent d11af26 commit 1d9b648d048f3563fcc41ca4c88ab89cde505999
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/app/qgisapp.cpp
@@ -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 )
@@ -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

0 comments on commit 1d9b648

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