Skip to content
Permalink
Browse files

[vectorlayercache] properly copy featurerequest

  • Loading branch information
m-kuhn committed Apr 19, 2013
1 parent 66c8cc1 commit 4885c7be90cbbb954f90bedf5093ecc5dabfb44f
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/qgsfeaturerequest.h
  2. +2 −2 src/core/qgsvectorlayercache.cpp
@@ -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; }
@@ -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

0 comments on commit 4885c7b

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