Skip to content
Permalink
Browse files

[attrtable] Minimize feature requests on load (Fix #8851)

  • Loading branch information
m-kuhn committed Nov 15, 2013
1 parent eaf90e6 commit c0b8e9abdf17c16a18235983688eee6104ce744e
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/gui/attributetable/qgsattributetablemodel.cpp
@@ -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 );

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

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

0 comments on commit c0b8e9a

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