Skip to content

Commit 5333405

Browse files
author
mhugent
committed
Fix for bug with wfs point layers that don't provide bbox information
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10834 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 755ea3e commit 5333405

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/providers/wfs/qgswfsdata.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,8 @@ void QgsWFSData::calculateExtentFromFeatures() const
824824

825825
QgsFeature* currentFeature = 0;
826826
QgsGeometry* currentGeometry = 0;
827+
bool bboxInitialised = false; //gets true once bbox has been set to the first geometry
828+
827829
for(int i = 0; i < mFeatures.size(); ++i)
828830
{
829831
currentFeature = mFeatures[i];
@@ -834,9 +836,10 @@ void QgsWFSData::calculateExtentFromFeatures() const
834836
currentGeometry = currentFeature->geometry();
835837
if(currentGeometry)
836838
{
837-
if(bbox.isEmpty())
839+
if(!bboxInitialised)
838840
{
839841
bbox = currentGeometry->boundingBox();
842+
bboxInitialised = true;
840843
}
841844
else
842845
{

0 commit comments

Comments
 (0)