Skip to content
Permalink
Browse files

[ftools] S'part to M'part with non-string columns and NULL values

Fix #8625
  • Loading branch information
m-kuhn committed Jan 30, 2014
1 parent 3fe3bc5 commit e4f410b589c43ce346930fd2523b815741c6257a
Showing with 11 additions and 1 deletion.
  1. +11 −1 python/plugins/fTools/tools/doGeometry.py
@@ -374,16 +374,26 @@ def single_to_multi( self ):
merge_all = self.myField == "--- " + self.tr( "Merge all" ) + " ---"
if not len( unique ) == self.vlayer.featureCount() or merge_all:
for i in unique:
# Strip spaces for strings, so " A " and "A" will be grouped
# TODO: Make this optional (opt-out to keep it easy for beginners)
if isinstance( i, basestring ):
iMod = i.strip()
else:
iMod = i
multi_feature= []
first = True
fit = vprovider.getFeatures()
while fit.nextFeature( inFeat ):
atMap = inFeat.attributes()
if not merge_all:
idVar = atMap[ index ]
if isinstance( idVar, basestring ):
idVarMod = idVar.strip()
else:
idVarMod = idVar
else:
idVar = ""
if idVar.strip() == i.strip() or merge_all:
if idVarMod == iMod or merge_all:
if first:
atts = atMap
first = False

0 comments on commit e4f410b

Please sign in to comment.