Skip to content
Permalink
Browse files

One feature pool per layer is enough

  • Loading branch information
m-kuhn committed Oct 1, 2018
1 parent 6df73d6 commit 09ee755500afd429c239a78ed59970bcd00a6572
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/app/qgsgeometryvalidationservice.cpp
@@ -259,8 +259,13 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
QgsFeatureIds affectedFeatureIds = layer->editBuffer()->changedGeometries().keys().toSet();
affectedFeatureIds.unite( layer->editBuffer()->addedFeatures().keys().toSet() );

// TODO: ownership of these objects...
QgsVectorLayerFeaturePool *featurePool = new QgsVectorLayerFeaturePool( layer );
QgsFeaturePool *featurePool = mFeaturePools.value( layer->id() );
if ( !featurePool )
{
featurePool = new QgsVectorLayerFeaturePool( layer );
mFeaturePools.insert( layer->id(), featurePool );
}

QList<QgsGeometryCheckError *> &allErrors = mLayerChecks[layer].topologyCheckErrors;
QMap<QString, QgsFeatureIds> layerIds;

@@ -279,11 +284,6 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
layerIds.insert( layer->id(), checkFeatureIds );
QgsGeometryCheck::LayerFeatureIds layerFeatureIds( layerIds );

if ( !mFeaturePools.contains( layer->id() ) )
{
mFeaturePools.insert( layer->id(), featurePool );
}

const QList<QgsGeometryCheck *> checks = mLayerChecks[layer].topologyChecks;

QMap<const QgsGeometryCheck *, QgsFeedback *> feedbacks;

0 comments on commit 09ee755

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