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.
This commit is contained in:
Matthias Kuhn 2015-10-20 16:39:08 +02:00
parent 148e808202
commit c45fc090d9

View File

@ -88,6 +88,8 @@ QgsPointLocator* QgsSnappingUtils::temporaryLocatorForLayer( QgsVectorLayer* vl,
bool QgsSnappingUtils::willUseIndex( QgsVectorLayer* vl ) const
{
if ( vl->geometryType() == QGis::NoGeometry )
return false;
if ( mStrategy == IndexAlwaysFull )
return true;
else if ( mStrategy == IndexNeverFull )