Skip to content
Permalink
Browse files
[bugfix] Respect multi-single part when importing
Fixes #15875
  • Loading branch information
elpaso committed Feb 25, 2018
1 parent faec620 commit 772adec
Showing 1 changed file with 3 additions and 1 deletion.
@@ -244,7 +244,9 @@ bool QgsPGConnectionItem::handleDrop( const QMimeData *data, const QString &toSc
uri.setSchema( toSchema );
}

std::unique_ptr< QgsVectorLayerExporterTask > exportTask( new QgsVectorLayerExporterTask( srcLayer, uri.uri( false ), QStringLiteral( "postgres" ), srcLayer->crs(), QVariantMap(), owner ) );
QVariantMap options;
options.insert( QStringLiteral( "forceSinglePartGeometryType" ), true );
std::unique_ptr< QgsVectorLayerExporterTask > exportTask( new QgsVectorLayerExporterTask( srcLayer, uri.uri( false ), QStringLiteral( "postgres" ), srcLayer->crs(), options, owner ) );

// when export is successful:
connect( exportTask.get(), &QgsVectorLayerExporterTask::exportComplete, this, [ = ]()

0 comments on commit 772adec

Please sign in to comment.