Skip to content

Commit

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

Expand Down

0 comments on commit 4987fb2

Please sign in to comment.