Skip to content

Commit 78eba9e

Browse files
signedavm-kuhn
authored andcommittedNov 16, 2017
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.
1 parent 7c9cc07 commit 78eba9e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎src/core/qgsvectorlayerutils.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,7 @@ QgsFeature QgsVectorLayerUtils::duplicateFeature( QgsVectorLayer *layer, const Q
367367
childFeature.setAttribute( fieldPair.first, newFeature.attribute( fieldPair.second ) );
368368
}
369369
//call the function for the child
370-
duplicateFeature( relation.referencingLayer(), childFeature, project, depth, duplicateFeatureContext );
371-
372-
//add the new feature id for feedback
373-
childFeatureIds.insert( childFeature.id() );
370+
childFeatureIds.insert( duplicateFeature( relation.referencingLayer(), childFeature, project, depth, duplicateFeatureContext ).id() );
374371
}
375372

376373
//store for feedback

0 commit comments

Comments
 (0)
Please sign in to comment.