[QGIS Commit] r10934 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Jun 15 13:13:46 EDT 2009
Author: gcontreras
Date: 2009-06-15 13:13:46 -0400 (Mon, 15 Jun 2009)
New Revision: 10934
Modified:
trunk/qgis/src/app/qgisapp.cpp
Log:
Fix for ticket #936, Legend name too long when executing "qgis vectorfile.shp"
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-06-15 15:40:28 UTC (rev 10933)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-06-15 17:13:46 UTC (rev 10934)
@@ -3648,7 +3648,8 @@
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 @@
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
More information about the QGIS-commit
mailing list