render layers by iterating over zOrder list rather than layers map

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@129 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
stevehalasz 2002-10-11 12:26:37 +00:00
parent a3877c4748
commit 5731cb86f5

View File

@ -161,16 +161,16 @@ void QgsMapCanvas::render2()
currentExtent.setYmin(dymin);
currentExtent.setYmax(dymax);
// render all layers in the stack, starting at the base
std::map < QString, QgsMapLayer * >::iterator mi = layers.begin();
std::list < QString >::iterator li = zOrder.begin();
// std::cout << "MAP LAYER COUNT: " << layers.size() << std::endl;
while (mi != layers.end()) {
QgsMapLayer *ml = (*mi).second;
while (li != zOrder.end()) {
QgsMapLayer *ml = layers[*li];
if (ml) {
// QgsDatabaseLayer *dbl = (QgsDatabaseLayer *)&ml;
// std::cout << "Rendering " << ml->name() << std::endl;
if (ml->visible())
ml->draw(paint, &currentExtent, coordXForm);
mi++;
li++;
// mi.draw(p, &fullExtent);
}
}