Skip to content
Permalink
Browse files
Point locator: fix addition of features when OTF reprojection is on
This would cause issues when editing geometries with OTF on.
Discovered by @nirvn
  • Loading branch information
wonder-sk committed Jan 25, 2015
1 parent 62b2c1f commit 01286cc
Showing 1 changed file with 6 additions and 0 deletions.
@@ -685,6 +685,12 @@ void QgsPointLocator::onFeatureAdded( QgsFeatureId fid )
QgsFeature f;
if ( mLayer->getFeatures( QgsFeatureRequest( fid ) ).nextFeature( f ) )
{
if ( !f.geometry() )
return;

if ( mTransform )
f.geometry()->transform( *mTransform );

SpatialIndex::Region r( rect2region( f.geometry()->boundingBox() ) );
mRTree->insertData( 0, 0, r, f.id() );
mGeoms[fid] = new QgsGeometry( *f.geometry() );

0 comments on commit 01286cc

Please sign in to comment.