Skip to content

Commit 049f5ca

Browse files
committedMay 22, 2012
fix #5617. Patch submitted by Salvatore Larosa, thanks!
1 parent a76d629 commit 049f5ca

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed
 

‎python/plugins/fTools/tools/doGeoprocessing.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,18 +1147,20 @@ def union( self ):
11471147
temp_list = int_geom.asGeometryCollection()
11481148
for i in temp_list:
11491149
if i.type() == geom.type():
1150+
int_geom = QgsGeometry( i )
11501151
try:
1151-
outFeat.setGeometry( j )
1152+
outFeat.setGeometry( int_geom )
11521153
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
11531154
writer.addFeature( outFeat )
11541155
except Exception, err:
11551156
FEATURE_EXCEPT = False
1156-
try:
1157-
outFeat.setGeometry( int_geom )
1158-
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
1159-
writer.addFeature( outFeat )
1160-
except Exception, err:
1161-
FEATURE_EXCEPT = False
1157+
else:
1158+
try:
1159+
outFeat.setGeometry( int_geom )
1160+
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
1161+
writer.addFeature( outFeat )
1162+
except Exception, err:
1163+
FEATURE_EXCEPT = False
11621164
else:
11631165
# this only happends if the bounding box
11641166
# intersects, but the geometry doesn't

0 commit comments

Comments
 (0)
Please sign in to comment.