[QGIS Commit] r10834 - trunk/qgis/src/providers/wfs

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri May 22 02:34:36 EDT 2009


Author: mhugent
Date: 2009-05-22 02:34:32 -0400 (Fri, 22 May 2009)
New Revision: 10834

Modified:
   trunk/qgis/src/providers/wfs/qgswfsdata.cpp
Log:
Fix for bug with wfs point layers that don't provide bbox information

Modified: trunk/qgis/src/providers/wfs/qgswfsdata.cpp
===================================================================
--- trunk/qgis/src/providers/wfs/qgswfsdata.cpp	2009-05-21 12:34:23 UTC (rev 10833)
+++ trunk/qgis/src/providers/wfs/qgswfsdata.cpp	2009-05-22 06:34:32 UTC (rev 10834)
@@ -824,6 +824,8 @@
 
     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];
@@ -834,9 +836,10 @@
         currentGeometry = currentFeature->geometry();
         if(currentGeometry)
         {
-            if(bbox.isEmpty())
+            if(!bboxInitialised)
             {
                 bbox = currentGeometry->boundingBox();
+                bboxInitialised = true;
             }
             else
             {



More information about the QGIS-commit mailing list