From: <mco...@us...> - 2005-11-09 20:41:13
|
Update of /cvsroot/qgis/qgis/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4817/src Modified Files: Tag: multiple-layers-branch qgsvectorlayer.cpp Log Message: - OGR provider now does sanity checking on valid layers for extent() - vector layer now specifies data provider layer when requesting layer extents Index: qgsvectorlayer.cpp =================================================================== RCS file: /cvsroot/qgis/qgis/src/qgsvectorlayer.cpp,v retrieving revision 1.228.2.7 retrieving revision 1.228.2.8 diff -C2 -d -r1.228.2.7 -r1.228.2.8 *** qgsvectorlayer.cpp 4 Nov 2005 00:38:44 -0000 1.228.2.7 --- qgsvectorlayer.cpp 9 Nov 2005 20:41:05 -0000 1.228.2.8 *************** *** 1423,1426 **** --- 1423,1428 ---- case QGis::WKBMultiPolygon: return QGis::Polygon; + default : + QgsDebug( QString( "Got invalid type " + QString::number(type) ).ascii() ); } } *************** *** 1628,1635 **** { // get the extent of the layer from the provider ! layerExtent.setXmin(getDataProvider()->extent()->xMin()); ! layerExtent.setYmin(getDataProvider()->extent()->yMin()); ! layerExtent.setXmax(getDataProvider()->extent()->xMax()); ! layerExtent.setYmax(getDataProvider()->extent()->yMax()); } else --- 1630,1637 ---- { // get the extent of the layer from the provider ! layerExtent.setXmin(getDataProvider()->extent(dataSourceLayerNum())->xMin()); ! layerExtent.setYmin(getDataProvider()->extent(dataSourceLayerNum())->yMin()); ! layerExtent.setXmax(getDataProvider()->extent(dataSourceLayerNum())->xMax()); ! layerExtent.setYmax(getDataProvider()->extent(dataSourceLayerNum())->yMax()); } else *************** *** 2334,2338 **** // get the extent ! QgsRect *mbr = getDataProvider()->extent(); // XXX specify layer num? // show the extent --- 2336,2341 ---- // get the extent ! QgsRect *mbr = ! getDataProvider()->extent(dataSourceLayerNum()); // XXX specify layer num? // show the extent |