Skip to content
Permalink
Browse files

Fix drawing order with embedded group

  • Loading branch information
mhugent committed Apr 15, 2014
1 parent d0d681c commit 5cd1a83feb3264c07b781b7f3937e699c08844f1
Showing with 11 additions and 4 deletions.
  1. +11 −4 src/app/legend/qgslegend.cpp
@@ -1504,15 +1504,22 @@ QList<QgsMapCanvasLayer> QgsLegend::canvasLayers()
}
embeddedGroupChildren.insert( ll );
}
QMap<int, QgsMapCanvasLayer >::iterator orderedLayersIt = orderedLayers.begin();
for ( ; orderedLayersIt != orderedLayers.end(); ++orderedLayersIt )

if ( mUpdateDrawingOrder )
{
if ( mUpdateDrawingOrder )
QMap<int, QgsMapCanvasLayer >::iterator orderedLayersIt = orderedLayers.begin();
for ( ; orderedLayersIt != orderedLayers.end(); ++orderedLayersIt )
{
layers.insert( layers.size(), orderedLayersIt.value() );
}
else
}
else //consider items are prepended with insertMulti
{
QMapIterator<int, QgsMapCanvasLayer > orderedLayersIt( orderedLayers );
orderedLayersIt.toBack();
while ( orderedLayersIt.hasPrevious() )
{
orderedLayersIt.previous();
layers.insertMulti( groupDrawingOrder, orderedLayersIt.value() );
}
}

0 comments on commit 5cd1a83

Please sign in to comment.
You can’t perform that action at this time.