File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -259,8 +259,13 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
259
259
QgsFeatureIds affectedFeatureIds = layer->editBuffer ()->changedGeometries ().keys ().toSet ();
260
260
affectedFeatureIds.unite ( layer->editBuffer ()->addedFeatures ().keys ().toSet () );
261
261
262
- // TODO: ownership of these objects...
263
- QgsVectorLayerFeaturePool *featurePool = new QgsVectorLayerFeaturePool ( layer );
262
+ QgsFeaturePool *featurePool = mFeaturePools .value ( layer->id () );
263
+ if ( !featurePool )
264
+ {
265
+ featurePool = new QgsVectorLayerFeaturePool ( layer );
266
+ mFeaturePools .insert ( layer->id (), featurePool );
267
+ }
268
+
264
269
QList<QgsGeometryCheckError *> &allErrors = mLayerChecks [layer].topologyCheckErrors ;
265
270
QMap<QString, QgsFeatureIds> layerIds;
266
271
@@ -279,11 +284,6 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
279
284
layerIds.insert ( layer->id (), checkFeatureIds );
280
285
QgsGeometryCheck::LayerFeatureIds layerFeatureIds ( layerIds );
281
286
282
- if ( !mFeaturePools .contains ( layer->id () ) )
283
- {
284
- mFeaturePools .insert ( layer->id (), featurePool );
285
- }
286
-
287
287
const QList<QgsGeometryCheck *> checks = mLayerChecks [layer].topologyChecks ;
288
288
289
289
QMap<const QgsGeometryCheck *, QgsFeedback *> feedbacks;
You can’t perform that action at this time.
0 commit comments