Skip to content

Commit

Permalink
[Geometry checker] Don't recheck any features if fixed error resulted…
Browse files Browse the repository at this point in the history
… in no changes
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent e089b3b commit 8cefc65
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/analysis/vector/geometry_checker/qgsgeometrychecker.cpp
Expand Up @@ -113,7 +113,8 @@ bool QgsGeometryChecker::fixError( QgsGeometryCheckError *error, int method, boo
return false;
}

if ( error->resolutionMessage() == tr( "No action" ) )
// If nothing was changed, stop here
if ( changes.isEmpty() )
{
return true;
}
Expand Down Expand Up @@ -188,20 +189,6 @@ bool QgsGeometryChecker::fixError( QgsGeometryCheckError *error, int method, boo
}
}

// Remove just-fixed error from newly-found errors if no changes occurred (needed in case error was fixed with "no change")
if ( changes.isEmpty() )
{
for ( QgsGeometryCheckError *recheckErr : recheckErrors )
{
if ( recheckErr->isEqual( error ) )
{
recheckErrors.removeAll( recheckErr );
delete recheckErr;
break;
}
}
}

// Go through error list, update other errors of the checked feature
for ( QgsGeometryCheckError *err : mCheckErrors )
{
Expand Down

0 comments on commit 8cefc65

Please sign in to comment.