Skip to content

Commit 4885c7b

Browse files
committedApr 19, 2013
[vectorlayercache] properly copy featurerequest
1 parent 66c8cc1 commit 4885c7b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/core/qgsfeaturerequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class CORE_EXPORT QgsFeatureRequest
7777
explicit QgsFeatureRequest( QgsFeatureId fid );
7878
//! construct a request with rectangle filter
7979
explicit QgsFeatureRequest( const QgsRectangle& rect );
80-
80+
//! copy constructor
8181
QgsFeatureRequest( const QgsFeatureRequest& rh );
8282

8383
FilterType filterType() const { return mFilter; }

‎src/core/qgsvectorlayercache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ QgsFeatureIterator QgsVectorLayerCache::getFeatures( const QgsFeatureRequest &fe
274274
if ( requiresWriterIt && mLayer->dataProvider() )
275275
{
276276
// No index was able to satisfy the request
277-
QgsFeatureRequest myRequest = QgsFeatureRequest( myRequest );
277+
QgsFeatureRequest myRequest = QgsFeatureRequest( featureRequest );
278278

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.