Skip to content

Commit

Permalink
Update QgsMapToolShowHideLabels to work with new vector api
Browse files Browse the repository at this point in the history
- Works now, but should have worked before this fix
  • Loading branch information
dakcarto committed Feb 8, 2013
1 parent c90870d commit 3676a38
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/app/qgsmaptoolshowhidelabels.cpp
Expand Up @@ -210,16 +210,14 @@ bool QgsMapToolShowHideLabels::selectedFeatures( QgsVectorLayer* vlayer,
QgsDebugMsg( "Selection layer: " + vlayer->name() );
QgsDebugMsg( "Selection polygon: " + selectGeomTrans.exportToWkt() );

QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectGeomTrans.boundingBox() ).setFlags( QgsFeatureRequest::NoGeometry | QgsFeatureRequest::ExactIntersect ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest()
.setFilterRect( selectGeomTrans.boundingBox() )
.setFlags( QgsFeatureRequest::ExactIntersect )
.setSubsetOfAttributes( QgsAttributeList() ) );

QgsFeature f;
while ( fit.nextFeature( f ) )
{
QgsGeometry* g = f.geometry();

if ( !selectGeomTrans.intersects( g ) )
continue;

selectedFeatIds.insert( f.id() );
}

Expand Down

0 comments on commit 3676a38

Please sign in to comment.