Skip to content
Permalink
Browse files

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
  • Loading branch information
m-kuhn committed Nov 5, 2014
1 parent 98c9ec7 commit 64b634fbf3ac6953b0268daaee315756913d3f77
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsvectorlayerfeatureiterator.cpp
@@ -410,7 +410,7 @@ void QgsVectorLayerFeatureIterator::useChangedAttributeFeature( QgsFeatureId fid
QgsFeatureIterator fi = mSource->mProviderFeatureSource->getFeatures( request );
if ( fi.nextFeature( tmp ) )
{
if ( mHasVirtualAttributes )
if ( mHasVirtualAttributes || mSource->mHasEditBuffer )
updateChangedAttributes( tmp );
f.setAttributes( tmp.attributes() );
}
@@ -506,7 +506,7 @@ void QgsVectorLayerFeatureIterator::prepareExpressions()
if ( mRequest.flags() & QgsFeatureRequest::SubsetOfAttributes )
{
QgsAttributeList attrs;
Q_FOREACH ( const QString& col, exp->referencedColumns() )
Q_FOREACH( const QString& col, exp->referencedColumns() )
{
attrs.append( mSource->mFields.fieldNameIndex( col ) );
}

0 comments on commit 64b634f

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