Skip to content
Permalink
Browse files

ftools: field uniqueness fix (fixes #11523)

  • Loading branch information
jef-n committed Oct 30, 2014
1 parent d941949 commit f09708004ec701ab511499c96935d8765c8ce0fb
Showing with 4 additions and 1 deletion.
  1. +3 −0 python/plugins/fTools/tools/doGeoprocessing.py
  2. +1 −1 python/plugins/fTools/tools/ftools_utils.py
@@ -919,6 +919,7 @@ def intersect( self ):
crs_match = None
else:
crs_match = crsA == crsB

fields = ftools_utils.combineVectorFields( self.vlayerA, self.vlayerB )
writer = QgsVectorFileWriter( self.myName, self.myEncoding, fields,
vproviderA.geometryType(), vproviderA.crs() )
@@ -928,6 +929,7 @@ def intersect( self ):
inFeatA = QgsFeature()
inFeatB = QgsFeature()
outFeat = QgsFeature()

nElement = 0

index = ftools_utils.createIndex( vproviderB )
@@ -1104,6 +1106,7 @@ def union( self ):
inFeatA = QgsFeature()
inFeatB = QgsFeature()
outFeat = QgsFeature()

indexA = ftools_utils.createIndex( vproviderB )
indexB = ftools_utils.createIndex( vproviderA )

@@ -175,7 +175,7 @@ def createUniqueFieldName( field ):
val = 2
else:
val = val + 1
field.setName( shortName[len( shortName )-1:] + unicode( val ) )
field.setName( shortName[:-1] + str( val ) )
except ValueError:
field.setName( shortName + "_2" )
else:

0 comments on commit f097080

Please sign in to comment.
You can’t perform that action at this time.