Skip to content
Permalink
Browse files

catch exception

  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 11, 2021
1 parent e11b21e commit 691a0b45a72069094561e777e846c42357ebaf9e
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/app/qgsmaptooladdfeature.cpp
@@ -100,8 +100,17 @@ void QgsMapToolAddFeature::digitized( const QgsFeature &f )
{
// transform geometry to vlayer crs and add topological point
QgsGeometry geom( f.geometry() );
geom.transform( QgsCoordinateTransform( vlayer->crs(), sm.at( i ).layer()->crs(), sm.at( i ).layer()->transformContext() ) );
sm.at( i ).layer()->addTopologicalPoints( geom.vertexAt( i ) );
try
{
geom.transform( QgsCoordinateTransform( vlayer->crs(), sm.at( i ).layer()->crs(), sm.at( i ).layer()->transformContext() ) );
sm.at( i ).layer()->addTopologicalPoints( geom.vertexAt( i ) );
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse )
QgsDebugMsg( QStringLiteral( "transformation to layer coordinate failed" ) );
}

}
}
vlayer->addTopologicalPoints( f.geometry() );

0 comments on commit 691a0b4

Please sign in to comment.