Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
postgres data items: don't set srid for geometryless layers
(cherry picked from commit d6e22af)
  • Loading branch information
jef-n committed Apr 7, 2015
1 parent 7210c4a commit 21b5a82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgresdataitems.cpp
Expand Up @@ -263,8 +263,9 @@ QString QgsPGLayerItem::createUri()

QgsDataSourceURI uri( QgsPostgresConn::connUri( connItem->name() ).connectionInfo() );
uri.setDataSource( mLayerProperty.schemaName, mLayerProperty.tableName, mLayerProperty.geometryColName, mLayerProperty.sql, pkColName );
uri.setSrid( QString::number( mLayerProperty.srids[0] ) );
uri.setWkbType( mLayerProperty.types[0] );
if ( uri.wkbType() != QGis::WKBNoGeometry )
uri.setSrid( QString::number( mLayerProperty.srids[0] ) );
QgsDebugMsg( QString( "layer uri: %1" ).arg( uri.uri() ) );
return uri.uri();
}
Expand Down

0 comments on commit 21b5a82

Please sign in to comment.