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 772adec552a374e380048dcd72cd35884e42e63f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/providers/postgres/qgspostgresdataitems.cpp
@@ -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.
You can’t perform that action at this time.