Skip to content
Permalink
Browse files

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

  • Loading branch information
nirvn committed Mar 28, 2021
1 parent 6ca82a2 commit cb24fe48e1f4896b1eaf05834b7c880a9978faa6
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -10449,7 +10449,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 cb24fe4

Please sign in to comment.