From d4e44b479666e9b4c79f2b23f5658a7d508d29bd Mon Sep 17 00:00:00 2001 From: VKa Date: Wed, 4 Jan 2012 11:28:27 +0100 Subject: [PATCH] Fix Union tool to produce correct attribute table (fix #4567) --- python/plugins/fTools/tools/doGeoprocessing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/plugins/fTools/tools/doGeoprocessing.py b/python/plugins/fTools/tools/doGeoprocessing.py index 67e1dbc2c3c4..06746b9f49ea 100644 --- a/python/plugins/fTools/tools/doGeoprocessing.py +++ b/python/plugins/fTools/tools/doGeoprocessing.py @@ -1202,7 +1202,6 @@ def union( self ): else: for id in intersects: vproviderA.featureAtId( int( id ), inFeatB , True, allAttrsA ) - atMapB = inFeatB.attributeMap() tmpGeom = QgsGeometry( inFeatB.geometry() ) try: @@ -1222,7 +1221,7 @@ def union( self ): if add: try: outFeat.setGeometry( diff_geom ) - outFeat.setAttributeMap( atMapB ) + outFeat.setAttributeMap( atMap ) writer.addFeature( outFeat ) except Exception, err: FEATURE_EXCEPT = False