Skip to content
Permalink
Browse files
Speed up the check for valid feature
  • Loading branch information
elpaso committed May 12, 2017
1 parent db89929 commit 1eaf03d
Showing 1 changed file with 6 additions and 1 deletion.
@@ -94,7 +94,12 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
return;

// This fixes https://issues.qgis.org/issues/16492
if ( ! vl->getFeature( fid ).isValid( ) )
QgsFeatureRequest request( fid );
request.setFlags( QgsFeatureRequest::NoGeometry );
request.setSubsetOfAttributes( QgsAttributeList( ) );
QgsFeature feature;
vl->getFeatures( request ).nextFeature( feature );
if ( ! feature.isValid( ) )
{
// Model is out of sync (again!).
return;

0 comments on commit 1eaf03d

Please sign in to comment.