Skip to content

Commit 1294190

Browse files
committedMar 14, 2013
fix Export geometry info tool (fix #7354)
1 parent 69c656e commit 1294190

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -566,19 +566,19 @@ def export_geometry_info( self ):
566566
if self.writeShape:
567567
outFeat.setGeometry( inGeom )
568568
atMap = inFeat.attributes()
569-
maxIndex = index1 if index1>index2 else index2
570-
if maxIndex>len(atMap):
571-
atMap += [ QVariant() ] * ( index2+1 - len(atMap) )
572-
atMap[ index1 ] = attr1
573-
if index1!=index2:
574-
atMap[ index2 ] = attr2
569+
maxIndex = index1 if index1>index2 else index2
570+
if maxIndex>len(atMap):
571+
atMap += [ QVariant() ] * ( index2+1 - len(atMap) )
572+
atMap[ index1 ] = attr1
573+
if index1!=index2:
574+
atMap[ index2 ] = attr2
575575
outFeat.setAttributes( atMap )
576576
writer.addFeature( outFeat )
577577
else:
578578
changeMap = {}
579579
changeMap[ inFeat.id() ] = {}
580580
changeMap[ inFeat.id() ][ index1 ] = QVariant( attr1 )
581-
if index1!=index2:
581+
if index1!=index2:
582582
changeMap[ inFeat.id() ][ index2 ] = QVariant( attr2 )
583583
vprovider.changeAttributeValues( changeMap )
584584

0 commit comments

Comments
 (0)
Please sign in to comment.