[QGIS Commit] r13633 - trunk/qgis/src/core/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Jun 3 07:14:07 EDT 2010
Author: mhugent
Date: 2010-06-03 07:14:07 -0400 (Thu, 03 Jun 2010)
New Revision: 13633
Modified:
trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
Fix for canvas item order in print composer (ticket #2755)
Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp 2010-06-03 11:06:49 UTC (rev 13632)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp 2010-06-03 11:14:07 UTC (rev 13633)
@@ -1411,16 +1411,21 @@
}
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 );
}
}
More information about the QGIS-commit
mailing list