Skip to content

Commit

Permalink
[Geometry checker] Only add to feature pool spatial indices features …
Browse files Browse the repository at this point in the history
…which are to be processed
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent e00f767 commit e089b3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/analysis/vector/geometry_checker/qgsfeaturepool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ QgsFeaturePool::QgsFeaturePool( QgsVectorLayer *layer, double layerToMapUnits, c
QgsFeatureIterator it = layer->getFeatures( req );
while ( it.nextFeature( feature ) )
{
if ( feature.geometry() )
if ( mFeatureIds.contains( feature.id() ) && feature.geometry() )
{
mIndex.insertFeature( feature );
}
Expand Down
5 changes: 0 additions & 5 deletions src/analysis/vector/geometry_checker/qgsgeometrychecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ bool QgsGeometryChecker::fixError( QgsGeometryCheckError *error, int method, boo
QgsFeaturePool *featurePool = mContext->featurePools[layerId];
QgsCoordinateTransform t = QgsCoordinateTransformCache::instance()->transform( mContext->mapCrs, featurePool->getLayer()->crs().authid() );
recheckAreaFeatures[layerId] = featurePool->getIntersects( t.transform( recheckArea ) );
// If only selected features were checked, confine the recheck areas to the selected features
if ( featurePool->getSelectedOnly() )
{
recheckAreaFeatures[layerId] = recheckAreaFeatures[layerId].intersect( featurePool->getLayer()->selectedFeatureIds() );
}
}

// Recheck feature / changed area to detect new errors
Expand Down

0 comments on commit e089b3b

Please sign in to comment.