Skip to content

Commit 01286cc

Browse files
committed
Point locator: fix addition of features when OTF reprojection is on
This would cause issues when editing geometries with OTF on. Discovered by @nirvn
1 parent 62b2c1f commit 01286cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/qgspointlocator.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,12 @@ void QgsPointLocator::onFeatureAdded( QgsFeatureId fid )
685685
QgsFeature f;
686686
if ( mLayer->getFeatures( QgsFeatureRequest( fid ) ).nextFeature( f ) )
687687
{
688+
if ( !f.geometry() )
689+
return;
690+
691+
if ( mTransform )
692+
f.geometry()->transform( *mTransform );
693+
688694
SpatialIndex::Region r( rect2region( f.geometry()->boundingBox() ) );
689695
mRTree->insertData( 0, 0, r, f.id() );
690696
mGeoms[fid] = new QgsGeometry( *f.geometry() );

0 commit comments

Comments
 (0)