Skip to content
Permalink
Browse files

Fix crash when de/reactivating layer checks

When errors have been found and shown on the dock and deactivating layer checks that resulted in crashes.
Also when deactivating and reactivating checks, that would result in crashes.
  • Loading branch information
m-kuhn committed Nov 2, 2018
1 parent 5bc588e commit 7fb8579c9ef2b9aaaf0db6b50f47ffb8dfb09315
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/app/qgsgeometryvalidationservice.cpp
@@ -180,9 +180,12 @@ void QgsGeometryValidationService::cleanupLayerChecks( QgsVectorLayer *layer )
VectorLayerCheckInformation &checkInformation = mLayerChecks[layer];

cancelTopologyCheck( layer );
clearTopologyChecks( layer );

qDeleteAll( checkInformation.singleFeatureChecks );
checkInformation.singleFeatureChecks.clear();
qDeleteAll( checkInformation.topologyChecks );
checkInformation.topologyChecks.clear();
checkInformation.context.reset();
}

@@ -320,6 +323,7 @@ void QgsGeometryValidationService::clearTopologyChecks( QgsVectorLayer *layer )
{
QList<std::shared_ptr<QgsGeometryCheckError>> &allErrors = mLayerChecks[layer].topologyCheckErrors;
allErrors.clear();
layer->setAllowCommit( mLayerChecks[layer].singleFeatureCheckErrors.empty() );

emit topologyChecksCleared( layer );
}
@@ -368,6 +372,7 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
{
cancelTopologyCheck( layer );
clearTopologyChecks( layer );
layer->setAllowCommit( false );

QgsFeatureIds affectedFeatureIds;
if ( layer->editBuffer() )

0 comments on commit 7fb8579

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