Skip to content

Commit c2c083a

Browse files
author
Hugo Mercier
committedAug 31, 2016
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)
1 parent d30f66e commit c2c083a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎src/core/qgspointlocator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ QgsPointLocator::QgsPointLocator( QgsVectorLayer* layer, const QgsCoordinateRefe
609609
connect( mLayer, SIGNAL( featureAdded( QgsFeatureId ) ), this, SLOT( onFeatureAdded( QgsFeatureId ) ) );
610610
connect( mLayer, SIGNAL( featureDeleted( QgsFeatureId ) ), this, SLOT( onFeatureDeleted( QgsFeatureId ) ) );
611611
connect( mLayer, SIGNAL( geometryChanged( QgsFeatureId, QgsGeometry& ) ), this, SLOT( onGeometryChanged( QgsFeatureId, QgsGeometry& ) ) );
612+
connect( mLayer, SIGNAL( dataChanged() ), this, SLOT( destroyIndex() ) );
612613
}
613614

614615

‎src/core/qgspointlocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ class CORE_EXPORT QgsPointLocator : public QObject
186186

187187
protected:
188188
bool rebuildIndex( int maxFeaturesToIndex = -1 );
189+
protected slots:
189190
void destroyIndex();
190-
191191
private slots:
192192
void onFeatureAdded( QgsFeatureId fid );
193193
void onFeatureDeleted( QgsFeatureId fid );

0 commit comments

Comments
 (0)
Please sign in to comment.