Skip to content

Commit 121e5f2

Browse files
author
gsherman
committed
Fix loading of spatialite table after creation
git-svn-id: http://svn.osgeo.org/qgis/trunk@13258 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a18ee29 commit 121e5f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/app/qgisapp.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,6 @@ void QgisApp::addSpatiaLiteLayer()
28102810
layername.truncate( idx );
28112811

28122812
// create the layer
2813-
//qWarning("creating layer");
28142813
QgsVectorLayer *layer = new QgsVectorLayer( "dbname='" + connectionInfo + "' table=" + *it + ") sql=", layername, "spatialite" );
28152814
if ( layer->isValid() )
28162815
{
@@ -3209,7 +3208,7 @@ void QgisApp::newSpatialiteLayer()
32093208
sqlite3_free( errmsg );
32103209
}
32113210

3212-
QgsVectorLayer *layer = new QgsVectorLayer( QString( "dbname=%1 table=%2(%3) sql=" )
3211+
QgsVectorLayer *layer = new QgsVectorLayer( QString( "dbname='%1' table='%2'(%3) sql=" )
32133212
.arg( databaseName )
32143213
.arg( newLayerName )
32153214
.arg( newGeometryColumn ), newLayerName, "spatialite" );

0 commit comments

Comments
 (0)