Skip to content
Permalink
Browse files
Adds a warning when a vertex move has caused the geometry's part coun…
…t to change by avoid overlaps
  • Loading branch information
lbartoletti committed May 17, 2021
1 parent 6927f35 commit 1036732ebc0382f69c299b9836785f38c95a4c8c
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/app/vertextool/qgsvertextool.cpp
@@ -2349,8 +2349,18 @@ void QgsVertexTool::applyEditsToLayers( QgsVertexTool::VertexEdits &edits )
id.insert( it2.key() );
ignoreFeatures.insert( layer, id );
int avoidIntersectionsReturn = featGeom.avoidIntersections( avoidIntersectionsLayers, ignoreFeatures );
if ( avoidIntersectionsReturn == 3 )
emit messageEmitted( tr( "At least one geometry intersected is invalid. These geometries must be manually repaired." ), Qgis::Warning );
switch ( avoidIntersectionsReturn )
{
case 2:
emit messageEmitted( tr( "The operation would change the geometry type." ), Qgis::Warning );
break;

case 3:
emit messageEmitted( tr( "At least one geometry intersected is invalid. These geometries must be manually repaired." ), Qgis::Warning );
break;
default:
break;
}
}
layer->changeGeometry( it2.key(), featGeom );
edits[layer][it2.key()] = featGeom;

0 comments on commit 1036732

Please sign in to comment.