Skip to content

Commit

Permalink
Fetch geometries when required by expression filter
Browse files Browse the repository at this point in the history
Fix #16358
  • Loading branch information
m-kuhn committed Mar 16, 2017
1 parent a7f92bd commit 90e9144
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -112,6 +112,11 @@ QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayerFeat
mRequest.setSubsetOfAttributes( mRequest.subsetOfAttributes() << attrIdx );
}
}

// Required for local filtering
// Also requred with compiler enabled for updateAttributeValues() on fetched features.
if ( mRequest.filterExpression()->needsGeometry() )
mRequest.setFlags( mRequest.flags() & ~QgsFeatureRequest::NoGeometry );
}

prepareFields();
Expand Down

0 comments on commit 90e9144

Please sign in to comment.