Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
catch exception
  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 11, 2021
1 parent e11b21e commit 691a0b4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit 691a0b4

Please sign in to comment.