Skip to content
Permalink
Browse files

Fix fid collisions when pasting features into a gpkg/spatialite dataset

  • Loading branch information
nirvn authored and github-actions committed Mar 28, 2021
1 parent 24b8998 commit 7e435fd6b9bcc6074f93fd4f9fa557f643ddef90
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -10376,7 +10376,7 @@ void QgisApp::pasteFromClipboard( QgsMapLayer *destinationLayer )
int nTotalFeatures = features.count();
QgsExpressionContext context = pasteVectorLayer->createExpressionContext();

QgsFeatureList compatibleFeatures( QgsVectorLayerUtils::makeFeaturesCompatible( features, pasteVectorLayer ) );
QgsFeatureList compatibleFeatures( QgsVectorLayerUtils::makeFeaturesCompatible( features, pasteVectorLayer, QgsFeatureSink::RegeneratePrimaryKey ) );
QgsVectorLayerUtils::QgsFeaturesDataList newFeaturesDataList;
newFeaturesDataList.reserve( compatibleFeatures.size() );

0 comments on commit 7e435fd

Please sign in to comment.