Skip to content
Permalink
Browse files

Remove redundant check

  • Loading branch information
m-kuhn committed Sep 9, 2020
1 parent 47a48bb commit be8644337142e88814fba6fa44a31fe8f650c15a
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/analysis/vector/qgszonalstatistics.cpp
@@ -112,10 +112,7 @@ QgsZonalStatistics::Result QgsZonalStatistics::calculateStatistics( QgsFeedback
long featureCount = vectorProvider->featureCount();

QgsFeatureRequest request;

// If we edit in place, we don't need the other attributes
if ( vectorProvider )
request.setNoAttributes();
request.setNoAttributes();

request.setDestinationCrs( mRasterCrs, QgsProject::instance()->transformContext() );
QgsFeatureIterator fi = vectorProvider->getFeatures( request );
@@ -153,8 +150,7 @@ QgsZonalStatistics::Result QgsZonalStatistics::calculateStatistics( QgsFeedback
changeMap.insert( feature.id(), changeAttributeMap );
}

if ( vectorProvider )
vectorProvider->changeAttributeValues( changeMap );
vectorProvider->changeAttributeValues( changeMap );
mPolygonLayer->updateFields();

if ( feedback )

0 comments on commit be86443

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