Skip to content

Commit 64b634f

Browse files
committed
Fix feature request with Fid Filter working on the edit buffer
The following snippet did not take attribut changes that have not been commited into account. layer.getFeatures( QgsFeatureRequest( fid ) ).next() Fixes the VectorLayer test
1 parent 98c9ec7 commit 64b634f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/qgsvectorlayerfeatureiterator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ void QgsVectorLayerFeatureIterator::useChangedAttributeFeature( QgsFeatureId fid
410410
QgsFeatureIterator fi = mSource->mProviderFeatureSource->getFeatures( request );
411411
if ( fi.nextFeature( tmp ) )
412412
{
413-
if ( mHasVirtualAttributes )
413+
if ( mHasVirtualAttributes || mSource->mHasEditBuffer )
414414
updateChangedAttributes( tmp );
415415
f.setAttributes( tmp.attributes() );
416416
}
@@ -506,7 +506,7 @@ void QgsVectorLayerFeatureIterator::prepareExpressions()
506506
if ( mRequest.flags() & QgsFeatureRequest::SubsetOfAttributes )
507507
{
508508
QgsAttributeList attrs;
509-
Q_FOREACH ( const QString& col, exp->referencedColumns() )
509+
Q_FOREACH( const QString& col, exp->referencedColumns() )
510510
{
511511
attrs.append( mSource->mFields.fieldNameIndex( col ) );
512512
}

0 commit comments

Comments
 (0)