Skip to content
Permalink
Browse files
Fix for canvas item order in print composer (ticket #2755)
git-svn-id: http://svn.osgeo.org/qgis/trunk@13633 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 3, 2010
1 parent 8ff807c commit 8c401d3a810d393d1319568069719564240aa6cd
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/core/composer/qgscomposermap.cpp
@@ -1411,16 +1411,21 @@ void QgsComposerMap::drawCanvasItems( QPainter* painter, const QStyleOptionGraph
}

QList<QGraphicsItem*> itemList = mMapCanvas->items();
if ( itemList.size() < 1 )
{
return;
}

QList<QGraphicsItem*>::iterator itemIt = itemList.begin();
for ( ; itemIt != itemList.end(); ++itemIt )
QGraphicsItem* currentItem = 0;
for ( int i = itemList.size() - 1; i >= 0; --i )
{
currentItem = itemList.at( i );
//don't draw mapcanvasmap (has z value -10)
if ( !( *itemIt ) || ( *itemIt )->zValue() == -10 )
if ( !currentItem || currentItem->zValue() == -10 )
{
continue;
}
drawCanvasItem( *itemIt, painter, itemStyle );
drawCanvasItem( currentItem, painter, itemStyle );
}
}

0 comments on commit 8c401d3

Please sign in to comment.