Skip to content
Permalink
Browse files

Fix Topological editing not working when the data CRS is different fr…

…om project CRS. Fixes #29648
  • Loading branch information
lbartoletti authored and nyalldawson committed Feb 11, 2021
1 parent f495d45 commit 16a071a9f01266b0df5d0ceb6afd0bc4af366581
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/qgsmaptooladdfeature.cpp
@@ -98,7 +98,10 @@ void QgsMapToolAddFeature::digitized( const QgsFeature &f )
{
if ( sm.at( i ).layer() )
{
sm.at( i ).layer()->addTopologicalPoints( f.geometry().vertexAt( i ) );
// 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 ) );
}
}
vlayer->addTopologicalPoints( f.geometry() );

0 comments on commit 16a071a

Please sign in to comment.