Skip to content
Permalink
Browse files

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

  • Loading branch information
nirvn authored and nyalldawson committed Mar 29, 2021
1 parent 0ac31cc commit 0d261d2f0719bcc9eb3cb328103080ffacdeb85c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -10514,7 +10514,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 0d261d2

Please sign in to comment.