Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 78eba9e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/qgsvectorlayerutils.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 78eba9e

Please sign in to comment.