Skip to content

Commit

Permalink
Fix fid collisions when pasting features into a gpkg/spatialite dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Mar 28, 2021
1 parent 6ca82a2 commit cb24fe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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() );

Expand Down

0 comments on commit cb24fe4

Please sign in to comment.