Skip to content

Commit c45fc09

Browse files
committed
Do not index geometryless layers for snapping
With a lot of geometryless layers in a project reindexing on every mousemove makes the UI unresponsive and brings up a "indexing layers" dialog with progress bar repeatedly.
1 parent 148e808 commit c45fc09

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/core/qgssnappingutils.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ QgsPointLocator* QgsSnappingUtils::temporaryLocatorForLayer( QgsVectorLayer* vl,
8888

8989
bool QgsSnappingUtils::willUseIndex( QgsVectorLayer* vl ) const
9090
{
91+
if ( vl->geometryType() == QGis::NoGeometry )
92+
return false;
9193
if ( mStrategy == IndexAlwaysFull )
9294
return true;
9395
else if ( mStrategy == IndexNeverFull )

0 commit comments

Comments
 (0)