QgsPointLocator* QgsSnappingUtils::locatorForLayerUsingStrategy( QgsVectorLayer* vl, const QgsPoint& pointMap, double tolerance ) { if ( willUseIndex( vl ) ) return locatorForLayer( vl ); else return temporaryLocatorForLayer( vl, pointMap, tolerance ); }
QgsPointLocator* QgsSnappingUtils::locatorForLayerUsingStrategy( QgsVectorLayer* vl, const QgsPoint& pointMap, double tolerance ) { QgsRectangle aoi( pointMap.x() - tolerance, pointMap.y() - tolerance, pointMap.x() + tolerance, pointMap.y() + tolerance ); if ( isIndexPrepared( vl, aoi ) ) return locatorForLayer( vl ); else return temporaryLocatorForLayer( vl, pointMap, tolerance ); }