Skip to content

Commit d132451

Browse files
committedDec 13, 2013
1 parent 402b397 commit d132451

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

‎python/plugins/processing/algs/JoinAttributes.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ def processAlgorithm(self, progress):
7575
joinField2Index = layer2.fieldNameIndex(field2)
7676

7777
# Output
78-
outFields = []
79-
outFields.extend(provider.fields())
80-
outFields.extend(provider2.fields())
78+
outFields = vector.combineVectorFields(layer,layer2)
8179

8280
writer = output.getVectorWriter(outFields, provider.geometryType(),
8381
layer.crs())
@@ -98,12 +96,10 @@ def processAlgorithm(self, progress):
9896
attrs2 = inFeat2.attributes()
9997
joinValue2 = attrs2[joinField2Index]
10098
if joinValue1 == joinValue2:
101-
10299
# Create the new feature
103100
outFeat.setGeometry(inGeom)
104101
attrs.extend(attrs2)
105102
break
106103
outFeat.setAttributes(attrs)
107104
writer.addFeature(outFeat)
108-
109105
del writer

0 commit comments

Comments
 (0)
Please sign in to comment.