mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
postgres data items: don't set srid for geometryless layers
This commit is contained in:
parent
12d7cfca03
commit
d6e22af949
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user