Skip to content

Commit

Permalink
Add join field to provider request also when requesting a subset of a…
Browse files Browse the repository at this point in the history
…ttributes

Fixes #8757
  • Loading branch information
m-kuhn committed Oct 10, 2013
1 parent b2ad0a9 commit 5e14fea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/qgsvectorlayerfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand All @@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 5e14fea

Please sign in to comment.