Skip to content
Permalink
Browse files

return ids of the new child features on duplication

when duplicating a feature in QgsVectorLayerUtils::duplicateFeature and this feature has over a relation the child features, we return now the ids of the new created child features in the respone object QgsDuplicateFeatureContext.
  • Loading branch information
signedav authored and m-kuhn committed Nov 16, 2017
1 parent 7c9cc07 commit 78eba9ed05d3e4c82a09e57b45a8c01d6622098f
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/core/qgsvectorlayerutils.cpp
@@ -367,10 +367,7 @@ QgsFeature QgsVectorLayerUtils::duplicateFeature( QgsVectorLayer *layer, const Q
childFeature.setAttribute( fieldPair.first, newFeature.attribute( fieldPair.second ) );
}
//call the function for the child
duplicateFeature( relation.referencingLayer(), childFeature, project, depth, duplicateFeatureContext );

//add the new feature id for feedback
childFeatureIds.insert( childFeature.id() );
childFeatureIds.insert( duplicateFeature( relation.referencingLayer(), childFeature, project, depth, duplicateFeatureContext ).id() );
}

//store for feedback

0 comments on commit 78eba9e

Please sign in to comment.
You can’t perform that action at this time.