Skip to content
Permalink
Browse files

Use cheap request

  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent cb4de25 commit 3b35948ba9934f99eec9b03063e33aaa94f15f87
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgsvectordataprovider.cpp
@@ -49,7 +49,11 @@ QString QgsVectorDataProvider::storageType() const
bool QgsVectorDataProvider::empty() const
{
QgsFeature f;
if ( getFeatures().nextFeature( f ) )
QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setFlags( QgsFeatureRequest::NoGeometry );
request.setLimit( 1 );
if ( getFeatures( request ).nextFeature( f ) )
return true;
else
return false;

0 comments on commit 3b35948

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