Skip to content

Commit

Permalink
Fix loading of spatialite table after creation
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13258 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Apr 6, 2010
1 parent a18ee29 commit 121e5f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -2810,7 +2810,6 @@ void QgisApp::addSpatiaLiteLayer()
layername.truncate( idx );

// create the layer
//qWarning("creating layer");
QgsVectorLayer *layer = new QgsVectorLayer( "dbname='" + connectionInfo + "' table=" + *it + ") sql=", layername, "spatialite" );
if ( layer->isValid() )
{
Expand Down Expand Up @@ -3209,7 +3208,7 @@ void QgisApp::newSpatialiteLayer()
sqlite3_free( errmsg );
}

QgsVectorLayer *layer = new QgsVectorLayer( QString( "dbname=%1 table=%2(%3) sql=" )
QgsVectorLayer *layer = new QgsVectorLayer( QString( "dbname='%1' table='%2'(%3) sql=" )
.arg( databaseName )
.arg( newLayerName )
.arg( newGeometryColumn ), newLayerName, "spatialite" );
Expand Down

0 comments on commit 121e5f2

Please sign in to comment.