Skip to content
Permalink
Browse files

Reinstate the geometry change verification which is the return code 2…

… used by the gps module (qgsgpsinformationwidget.cpp)
  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 12, 2021
1 parent 7e77322 commit fc70957b0c5596ab0292d6508df9edcad701fd3a
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/geometry/qgsgeometry.cpp
@@ -2602,6 +2602,8 @@ int QgsGeometry::avoidIntersections( const QList<QgsVectorLayer *> &avoidInterse
return 1;
}

QgsWkbTypes::Type geomTypeBeforeModification = wkbType();

bool haveGeometryError = false;
bool hadInvalidGeometry = false;
std::unique_ptr< QgsAbstractGeometry > diffGeom = QgsGeometryEditUtils::avoidIntersections( *( d->geometry ), avoidIntersectionsLayers, hadInvalidGeometry, haveGeometryError, ignoreFeatures );
@@ -2610,6 +2612,8 @@ int QgsGeometry::avoidIntersections( const QList<QgsVectorLayer *> &avoidInterse
reset( std::move( diffGeom ) );
}

if ( geomTypeBeforeModification != wkbType() )
return 2;
if ( haveGeometryError )
return 3;
if ( hadInvalidGeometry )

0 comments on commit fc70957

Please sign in to comment.