[Geometry checker] If fixing an error produced changes, treat newly detected errors which are the same as the error fixed as actual new errors

This commit is contained in:
Sandro Mani 2016-07-14 16:40:34 +02:00
parent 41ce5279dd
commit 2f6be7a504

View File

@ -155,14 +155,17 @@ bool QgsGeometryChecker::fixError( QgsGeometryCheckError* error, int method )
}
}
// Remove just-fixed error from newly-found errors (needed in case error was fixed with "no change")
Q_FOREACH ( QgsGeometryCheckError* recheckErr, recheckErrors )
// Remove just-fixed error from newly-found errors if no changes occurred (needed in case error was fixed with "no change")
if ( changes.isEmpty() )
{
if ( recheckErr->isEqual( error ) )
Q_FOREACH ( QgsGeometryCheckError* recheckErr, recheckErrors )
{
recheckErrors.removeAll( recheckErr );
delete recheckErr;
break;
if ( recheckErr->isEqual( error ) )
{
recheckErrors.removeAll( recheckErr );
delete recheckErr;
break;
}
}
}