Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Aug 31, 2016
1 parent d30f66e commit c2c083a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/qgspointlocator.cpp
Expand Up @@ -609,6 +609,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() ) );
}


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgspointlocator.h
Expand Up @@ -186,8 +186,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 );
Expand Down

0 comments on commit c2c083a

Please sign in to comment.