Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for bug with wfs point layers that don't provide bbox information
git-svn-id: http://svn.osgeo.org/qgis/trunk@10834 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 22, 2009
1 parent aacd9f6 commit 61a292f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/providers/wfs/qgswfsdata.cpp
Expand Up @@ -824,6 +824,8 @@ void QgsWFSData::calculateExtentFromFeatures() const

QgsFeature* currentFeature = 0;
QgsGeometry* currentGeometry = 0;
bool bboxInitialised = false; //gets true once bbox has been set to the first geometry

for(int i = 0; i < mFeatures.size(); ++i)
{
currentFeature = mFeatures[i];
Expand All @@ -834,9 +836,10 @@ void QgsWFSData::calculateExtentFromFeatures() const
currentGeometry = currentFeature->geometry();
if(currentGeometry)
{
if(bbox.isEmpty())
if(!bboxInitialised)
{
bbox = currentGeometry->boundingBox();
bboxInitialised = true;
}
else
{
Expand Down

0 comments on commit 61a292f

Please sign in to comment.