@@ -55,12 +55,6 @@ QgsFeatureIterator QgsVectorLayerFeatureSource::getFeatures( const QgsFeatureReq
55
55
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator (QgsVectorLayerFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
56
56
: QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
57
57
{
58
- mChangedFeaturesRequest = mRequest ;
59
-
60
- if ( mSource ->mHasEditBuffer )
61
- {
62
- mChangedFeaturesRequest .setFilterFids ( mSource ->mChangedAttributeValues .keys ().toSet () );
63
- }
64
58
65
59
// prepare joins: may add more attributes to fetch (in order to allow join)
66
60
if ( mSource ->mJoinBuffer ->containsJoins () )
@@ -85,6 +79,12 @@ QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator(QgsVectorLayerFeatu
85
79
mProviderRequest .setSubsetOfAttributes ( providerSubset );
86
80
}
87
81
82
+ if ( mSource ->mHasEditBuffer )
83
+ {
84
+ mChangedFeaturesRequest = mProviderRequest ;
85
+ mChangedFeaturesRequest .setFilterFids ( mSource ->mChangedAttributeValues .keys ().toSet () );
86
+ }
87
+
88
88
if ( request.filterType () == QgsFeatureRequest::FilterFid )
89
89
{
90
90
mFetchedFid = false ;
@@ -302,6 +302,9 @@ bool QgsVectorLayerFeatureIterator::fetchNextChangedAttributeFeature( QgsFeature
302
302
303
303
updateChangedAttributes ( f );
304
304
305
+ if ( !mFetchJoinInfo .isEmpty () )
306
+ addJoinedAttributes ( f );
307
+
305
308
if ( mRequest .filterType () == QgsFeatureRequest::FilterExpression )
306
309
{
307
310
if ( mRequest .filterExpression ()->evaluate ( &f ).toBool () )
0 commit comments