do not consider layer extents containing 'inf' or 'nan' for wms bounding box calculation

git-svn-id: http://svn.osgeo.org/qgis/trunk@5583 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2006-07-10 13:32:31 +00:00
parent 42d814ec16
commit af33fb9a98

View File

@ -1941,6 +1941,13 @@ bool QgsWmsProvider::calculateExtent()
continue; //ignore extents of layers which cannot be transformed info the required CRS continue; //ignore extents of layers which cannot be transformed info the required CRS
} }
//make sure extent does not contain 'inf' or 'nan'
if(!isfinite(extent.xMin()) || !isfinite((int)extent.yMin()) || !isfinite(extent.xMax()) || \
!isfinite((int)extent.yMax()))
{
continue;
}
// add to the combined extent of all the active sublayers // add to the combined extent of all the active sublayers
if (firstLayer) if (firstLayer)
{ {