Skip to content
Permalink
Browse files
Limit the initial feature request sent by expression builder widget
Should help avoid short delays in opening the expression widget
on slower layers (such as with the Postgres provider where features
are fetched in a minimum batch of 2000 by default)
  • Loading branch information
nyalldawson committed May 8, 2017
1 parent 9a19a5f commit cd248c6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -548,7 +548,7 @@ void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged()
{
// no feature passed yet, try to get from layer
QgsFeature f;
mLayer->getFeatures().nextFeature( f );
mLayer->getFeatures( QgsFeatureRequest().setLimit( 1 ) ).nextFeature( f );
mExpressionContext.setFeature( f );
}
}

1 comment on commit cd248c6

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Please sign in to comment.