Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Draw layers in composer in correct order.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6919 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed May 1, 2007
1 parent 0e6afd6 commit c998ca2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/app/composer/qgscomposermap.cpp
Expand Up @@ -112,7 +112,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect &extent, QgsMapToPixel *t
int nlayers = mMapCanvas->layerCount();
QgsCoordinateTransform* ct;

for ( int i = 0; i < nlayers; i++ ) {
for ( int i = nlayers - 1; i >= 0; i-- ) {
QgsMapLayer *layer = mMapCanvas->getZpos(i);

if (mMapCanvas->projectionsEnabled())
Expand All @@ -124,9 +124,6 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect &extent, QgsMapToPixel *t
ct = NULL;
}

// TODO: what to do with invisible layers
//if ( !layer->visible() ) continue;

if ( layer->type() == QgsMapLayer::VECTOR ) {
QgsVectorLayer *vector = dynamic_cast <QgsVectorLayer*> (layer);

Expand Down Expand Up @@ -179,7 +176,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect &extent, QgsMapToPixel *t
}

// Draw vector labels
for ( int i = 0; i < nlayers; i++ ) {
for ( int i = nlayers - 1; i >= 0; i-- ) {
QgsMapLayer *layer = mMapCanvas->getZpos(i);

if (mMapCanvas->projectionsEnabled())
Expand All @@ -191,9 +188,6 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect &extent, QgsMapToPixel *t
ct = NULL;
}

// TODO: what to do with invisible layers
//if ( !layer->visible() ) continue;

if ( layer->type() == QgsMapLayer::VECTOR ) {
QgsVectorLayer *vector = dynamic_cast <QgsVectorLayer*> (layer);

Expand Down

0 comments on commit c998ca2

Please sign in to comment.