Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 9, 2020
1 parent 47a48bb commit be86443
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/analysis/vector/qgszonalstatistics.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit be86443

Please sign in to comment.