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 05a9636 commit 068bb17e1a69aebc9d58c7b178e2d1544c598154
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 068bb17

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