Skip to content
Permalink
Browse files
Fetch geometries when required by expression filter
Fix #16358
  • Loading branch information
m-kuhn committed Mar 16, 2017
1 parent a7f92bd commit 90e91448f6e09911b226305702ba40b089ec127d
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgsvectorlayerfeatureiterator.cpp
@@ -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();

0 comments on commit 90e9144

Please sign in to comment.