Skip to content

Commit

Permalink
[vectorlayercache] properly copy featurerequest
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 19, 2013
1 parent 66c8cc1 commit 4885c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsfeaturerequest.h
Expand Up @@ -77,7 +77,7 @@ class CORE_EXPORT QgsFeatureRequest
explicit QgsFeatureRequest( QgsFeatureId fid );
//! construct a request with rectangle filter
explicit QgsFeatureRequest( const QgsRectangle& rect );

//! copy constructor
QgsFeatureRequest( const QgsFeatureRequest& rh );

FilterType filterType() const { return mFilter; }
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayercache.cpp
Expand Up @@ -274,10 +274,10 @@ QgsFeatureIterator QgsVectorLayerCache::getFeatures( const QgsFeatureRequest &fe
if ( requiresWriterIt && mLayer->dataProvider() )
{
// No index was able to satisfy the request
QgsFeatureRequest myRequest = QgsFeatureRequest( myRequest );
QgsFeatureRequest myRequest = QgsFeatureRequest( featureRequest );

// Make sure if we cache the geometry, it gets fetched
if ( mCacheGeometry )
if ( mCacheGeometry && mLayer->hasGeometryType() )
myRequest.setFlags( featureRequest.flags() & ~QgsFeatureRequest::NoGeometry );

// Make sure, all the cached attributes are requested as well
Expand Down

0 comments on commit 4885c7b

Please sign in to comment.