25 void QgsMapToolCaptureLayerGeometry::geometryCaptured(
const QgsGeometry &geometry )
44 if ( !hasCurvedSegments || !providerSupportsCurvedSegments )
47 QList<QgsVectorLayer *> avoidIntersectionsLayers;
52 avoidIntersectionsLayers.append( vlayer );
60 if ( avoidIntersectionsLayers.size() > 0 )
62 const int avoidIntersectionsReturn = g.avoidIntersections( avoidIntersectionsLayers );
63 if ( avoidIntersectionsReturn == 3 )
65 emit
messageEmitted( tr(
"The feature has been added, but at least one geometry intersected is invalid. These geometries must be manually repaired." ), Qgis::MessageLevel::Warning );
69 emit
messageEmitted( tr(
"The feature cannot be added because its geometry collapsed due to intersection avoidance" ), Qgis::MessageLevel::Critical );
77 layerGeometryCaptured( g );
84 layerPointCaptured( *qgsgeometry_cast<const QgsPoint *>( g.constGet() ) );
87 layerLineCaptured( qgsgeometry_cast<const QgsCurve *>( g.constGet() ) );
90 layerPolygonCaptured( qgsgeometry_cast<const QgsCurvePolygon *>( g.constGet() ) );