mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[Fix #7414] - points in polygon does not work
This commit is contained in:
parent
27f65c2355
commit
4e257bdf7e
@ -169,7 +169,7 @@ class PointsInPolygonThread(QThread):
|
||||
fieldList = ftools_utils.getFieldList(self.layerPoly)
|
||||
index = polyProvider.fieldNameIndex(unicode(self.fieldName))
|
||||
if index == -1:
|
||||
index = polyProvider.fieldCount()
|
||||
index = polyProvider.fields().count()
|
||||
fieldList.append( QgsField(unicode(self.fieldName), QVariant.Double, "real", 24, 15, self.tr("point count field")) )
|
||||
|
||||
sRs = polyProvider.crs()
|
||||
@ -218,7 +218,8 @@ class PointsInPolygonThread(QThread):
|
||||
interrupted = True
|
||||
break
|
||||
|
||||
outFeat.setAttribute(index, QVariant(count))
|
||||
atMap.append(QVariant(count))
|
||||
outFeat.setAttributes(atMap)
|
||||
writer.addFeature(outFeat)
|
||||
|
||||
self.emit( SIGNAL( "updateProgress()" ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user