Skip to content
Permalink
Browse files

Snapping: destroy index on dataChanged signal

Snapping caches on layers that have been changed by the provider or
by external sources are now invalidated.

(Cherry-picked from e6fd2e2)
  • Loading branch information
Hugo Mercier
Hugo Mercier committed Aug 31, 2016
1 parent 54a50cc commit dd393fe72460899c7e0eb70cb82c166d8b7c1d37
Showing with 2 additions and 1 deletion.
  1. +1 −0 src/core/qgspointlocator.cpp
  2. +1 −1 src/core/qgspointlocator.h
@@ -628,6 +628,7 @@ QgsPointLocator::QgsPointLocator( QgsVectorLayer* layer, const QgsCoordinateRefe
connect( mLayer, SIGNAL( featureAdded( QgsFeatureId ) ), this, SLOT( onFeatureAdded( QgsFeatureId ) ) );
connect( mLayer, SIGNAL( featureDeleted( QgsFeatureId ) ), this, SLOT( onFeatureDeleted( QgsFeatureId ) ) );
connect( mLayer, SIGNAL( geometryChanged( QgsFeatureId, QgsGeometry& ) ), this, SLOT( onGeometryChanged( QgsFeatureId, QgsGeometry& ) ) );
connect( mLayer, SIGNAL( dataChanged() ), this, SLOT( destroyIndex() ) );
}


@@ -207,8 +207,8 @@ class CORE_EXPORT QgsPointLocator : public QObject

protected:
bool rebuildIndex( int maxFeaturesToIndex = -1 );
protected slots:
void destroyIndex();

private slots:
void onFeatureAdded( QgsFeatureId fid );
void onFeatureDeleted( QgsFeatureId fid );

0 comments on commit dd393fe

Please sign in to comment.
You can’t perform that action at this time.