Skip to content

Commit

Permalink
[attrtable] Minimize feature requests on load (Fix #8851)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 15, 2013
1 parent eaf90e6 commit c0b8e9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/attributetable/qgsattributetablemodel.cpp
Expand Up @@ -133,7 +133,12 @@ bool QgsAttributeTableModel::removeRows( int row, int count, const QModelIndex &
void QgsAttributeTableModel::featureAdded( QgsFeatureId fid )
{
QgsDebugMsgLevel( QString( "(%2) fid: %1" ).arg( fid ).arg( mFeatureRequest.filterType() ), 4 );
if ( loadFeatureAtId( fid ) && mFeatureRequest.acceptFeature( mFeat ) )
bool featOk = true;

if ( mFeat.id() != fid )
featOk = loadFeatureAtId( fid );

if ( featOk && mFeatureRequest.acceptFeature( mFeat ) )
{
mFieldCache[ fid ] = mFeat.attribute( mCachedField );

Expand Down Expand Up @@ -351,6 +356,7 @@ void QgsAttributeTableModel::loadLayer()

t.restart();
}
mFeat = feat;
featureAdded( feat.id() );
}

Expand Down

0 comments on commit c0b8e9a

Please sign in to comment.