Skip to content

Commit

Permalink
fix Export geometry info tool (fix #7354)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Mar 14, 2013
1 parent 69c656e commit 1294190
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/plugins/fTools/tools/doGeometry.py
Expand Up @@ -566,19 +566,19 @@ def export_geometry_info( self ):
if self.writeShape:
outFeat.setGeometry( inGeom )
atMap = inFeat.attributes()
maxIndex = index1 if index1>index2 else index2
if maxIndex>len(atMap):
atMap += [ QVariant() ] * ( index2+1 - len(atMap) )
atMap[ index1 ] = attr1
if index1!=index2:
atMap[ index2 ] = attr2
maxIndex = index1 if index1>index2 else index2
if maxIndex>len(atMap):
atMap += [ QVariant() ] * ( index2+1 - len(atMap) )
atMap[ index1 ] = attr1
if index1!=index2:
atMap[ index2 ] = attr2
outFeat.setAttributes( atMap )
writer.addFeature( outFeat )
else:
changeMap = {}
changeMap[ inFeat.id() ] = {}
changeMap[ inFeat.id() ][ index1 ] = QVariant( attr1 )
if index1!=index2:
if index1!=index2:
changeMap[ inFeat.id() ][ index2 ] = QVariant( attr2 )
vprovider.changeAttributeValues( changeMap )

Expand Down

0 comments on commit 1294190

Please sign in to comment.