mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
attempt to fix http://hub.qgis.org/issues/9184
This commit is contained in:
parent
402b397eb8
commit
d13245190d
@ -75,9 +75,7 @@ class JoinAttributes(GeoAlgorithm):
|
||||
joinField2Index = layer2.fieldNameIndex(field2)
|
||||
|
||||
# Output
|
||||
outFields = []
|
||||
outFields.extend(provider.fields())
|
||||
outFields.extend(provider2.fields())
|
||||
outFields = vector.combineVectorFields(layer,layer2)
|
||||
|
||||
writer = output.getVectorWriter(outFields, provider.geometryType(),
|
||||
layer.crs())
|
||||
@ -98,12 +96,10 @@ class JoinAttributes(GeoAlgorithm):
|
||||
attrs2 = inFeat2.attributes()
|
||||
joinValue2 = attrs2[joinField2Index]
|
||||
if joinValue1 == joinValue2:
|
||||
|
||||
# Create the new feature
|
||||
outFeat.setGeometry(inGeom)
|
||||
attrs.extend(attrs2)
|
||||
break
|
||||
outFeat.setAttributes(attrs)
|
||||
writer.addFeature(outFeat)
|
||||
|
||||
del writer
|
||||
|
Loading…
x
Reference in New Issue
Block a user