Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ogr provider: fix feature count retrieval
git-svn-id: http://svn.osgeo.org/qgis/trunk@11801 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 13, 2009
1 parent 150c728 commit e3520c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -246,6 +246,12 @@ bool QgsOgrProvider::setSubsetString( QString theSQL )
}
setDataSourceUri( uri );

OGR_L_ResetReading( ogrLayer );

// getting the total number of features in the layer
// TODO: This can be expensive, do we really need it!
featuresCounted = OGR_L_GetFeatureCount( ogrLayer, TRUE );

// get the extent_ (envelope) of the layer
QgsDebugMsg( "Starting get extent" );

Expand All @@ -254,10 +260,6 @@ bool QgsOgrProvider::setSubsetString( QString theSQL )

QgsDebugMsg( "Finished get extent" );

// getting the total number of features in the layer
// TODO: This can be expensive, do we really need it!
featuresCounted = OGR_L_GetFeatureCount( ogrLayer, TRUE );

// check the validity of the layer
QgsDebugMsg( "checking validity" );
loadFields();
Expand Down

0 comments on commit e3520c7

Please sign in to comment.