File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ int QgsZonalStatistics::calculateStatistics( QProgressDialog* p )
246
246
FeatureStats featureStats ( statsStoreValues, statsStoreValueCount );
247
247
int featureCounter = 0 ;
248
248
249
+ QgsChangedAttributesMap changeMap;
249
250
while ( fi.nextFeature ( f ) )
250
251
{
251
252
if ( p )
@@ -300,7 +301,6 @@ int QgsZonalStatistics::calculateStatistics( QProgressDialog* p )
300
301
}
301
302
302
303
// write the statistics value to the vector data provider
303
- QgsChangedAttributesMap changeMap;
304
304
QgsAttributeMap changeAttributeMap;
305
305
if ( mStatistics & QgsZonalStatistics::Count )
306
306
changeAttributeMap.insert ( countIndex, QVariant ( featureStats.count ) );
@@ -364,11 +364,11 @@ int QgsZonalStatistics::calculateStatistics( QProgressDialog* p )
364
364
}
365
365
366
366
changeMap.insert ( f.id (), changeAttributeMap );
367
- vectorProvider->changeAttributeValues ( changeMap );
368
-
369
367
++featureCounter;
370
368
}
371
369
370
+ vectorProvider->changeAttributeValues ( changeMap );
371
+
372
372
if ( p )
373
373
{
374
374
p->setValue ( featureCount );
You can’t perform that action at this time.
0 commit comments