Skip to content
Permalink
Browse files

Feature #8725: check QgsFeatureRequest::NoGeometry

  • Loading branch information
ahuarte47 committed Oct 23, 2013
1 parent daa72c2 commit 40b5b1e3c7e6e21c80d070008fbfd5bedc3ae70f
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/qgsfeaturerequest.cpp
  2. +2 −2 src/core/qgsvectorlayer.cpp
@@ -564,7 +564,7 @@ bool QgsFeatureRequest::simplifyGeometry( QgsGeometry* geometry, const QgsCoordi
unsigned char* targetWkb = (unsigned char*)malloc( targetWkbSize );
memcpy( targetWkb, wkb, targetWkbSize );
geometry->fromWkb( targetWkb, targetWkbSize );
return true;
return true;
}
return false;
}
@@ -694,7 +694,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
.setSubsetOfAttributes( attributes );

// Enable the simplification of the geometries before fetch the features using the current map2pixel context.
if ( mSimplifyDrawing )
if ( mSimplifyDrawing && !(featureRequest.flags() & QgsFeatureRequest::NoGeometry) )
{
featureRequest.setFlags( featureRequest.flags() | QgsFeatureRequest::SimplifyGeometries );
featureRequest.setCoordinateTransform( rendererContext.coordinateTransform() );
@@ -1221,7 +1221,7 @@ QgsFeatureIterator QgsVectorLayer::getFeatures( const QgsFeatureRequest& request
if ( !mDataProvider )
return QgsFeatureIterator();

if ( mSimplifyDrawing && request.flags() & QgsFeatureRequest::SimplifyGeometries )
if ( mSimplifyDrawing && (request.flags() & QgsFeatureRequest::SimplifyGeometries) && !(request.flags() & QgsFeatureRequest::NoGeometry) )
return QgsFeatureIterator( new QgsSimplifiedVectorLayerFeatureIterator( this, request ) );

return QgsFeatureIterator( new QgsVectorLayerFeatureIterator( this, request ) );

0 comments on commit 40b5b1e

Please sign in to comment.
You can’t perform that action at this time.