Skip to content
Permalink
Browse files

[Geometry Checker] Don't add geometry-less features to feature-pool

  • Loading branch information
manisandro committed Dec 6, 2016
1 parent adff069 commit 97eb0f742f6501b981407a17b2e2293cabbad1c9
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/plugins/geometry_checker/utils/qgsfeaturepool.cpp
@@ -44,7 +44,18 @@ QgsFeaturePool::QgsFeaturePool( QgsVectorLayer *layer, bool selectedOnly )
QgsFeature feature;
QgsFeatureRequest req;
req.setSubsetOfAttributes( QgsAttributeList() );
mIndex = QgsSpatialIndex( layer->getFeatures( req ) );
QgsFeatureIterator it = layer->getFeatures( req );
while ( it.nextFeature( feature ) )
{
if ( feature.geometry() )
{
mIndex.insertFeature( feature );
}
else
{
mFeatureIds.remove( feature.id() );
}
}
}

bool QgsFeaturePool::get( QgsFeatureId id , QgsFeature& feature )

0 comments on commit 97eb0f7

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