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 fe6594e commit 63d9421dea3c0e5612a4ddd78cd90949b928a0dd
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 63d9421

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