Skip to content

Commit

Permalink
[Geometry checker] Fix incomplete QgsGeometryOverlapCheckError::handl…
Browse files Browse the repository at this point in the history
…eChanges
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent 9218afd commit 5de0c80
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometryoverlapcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
return err && other->layerId() == layerId() && other->featureId() == featureId() && err->overlappedFeature() == overlappedFeature();
}

bool handleChanges( const QgsGeometryCheck::Changes &changes ) override
{
if ( !QgsGeometryCheckError::handleChanges( changes ) )
{
return false;
}
if ( changes.value( mOverlappedFeature.first ).keys().contains( mOverlappedFeature.second ) )
{
return false;
}
return true;
}

virtual QString description() const override { return QApplication::translate( "QgsGeometryTypeCheckError", "Overlap with %1:%2" ).arg( mOverlappedFeature.first ).arg( mOverlappedFeature.second ); }

private:
Expand Down

0 comments on commit 5de0c80

Please sign in to comment.