Skip to content
Permalink
Browse files

Add join field to provider request also when requesting a subset of a…

…ttributes

Fixes #8757
  • Loading branch information
m-kuhn committed Oct 10, 2013
1 parent b2ad0a9 commit 5e14fea1b856e4178f545c9a81ce7090240bc06c
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/qgsvectorlayerfeatureiterator.cpp
@@ -25,8 +25,6 @@ QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayer* la
{
QgsVectorLayerJoinBuffer* joinBuffer = L->mJoinBuffer;

// by default provider's request is the same
mProviderRequest = mRequest;
mChangedFeaturesRequest = mRequest;

if ( L->editBuffer() )
@@ -44,6 +42,9 @@ QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayer* la
if ( joinBuffer->containsJoins() )
prepareJoins();

// by default provider's request is the same
mProviderRequest = mRequest;

if ( mProviderRequest.flags() & QgsFeatureRequest::SubsetOfAttributes )
{
// prepare list of attributes to match provider fields
@@ -208,7 +209,7 @@ bool QgsVectorLayerFeatureIterator::fetchNextAddedFeature( QgsFeature& f )
// must have changed geometry outside rectangle
continue;

if ( !mRequest.acceptFeature ( *mFetchAddedFeaturesIt ) )
if ( !mRequest.acceptFeature( *mFetchAddedFeaturesIt ) )
// skip features which are not accepted by the filter
continue;

0 comments on commit 5e14fea

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