Skip to content
Permalink
Browse files
Follow up for #3605
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15604 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 25, 2011
1 parent afe6139 commit 9869edcb244cbf0cede7e9bff86181c2625d3f10
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/composer/qgscomposerlegend.cpp
@@ -200,9 +200,9 @@ void QgsComposerLegend::drawLayerItem( QPainter* p, QgsComposerLayerItem* layerI
}

//Let the user omit the layer title item by having an empty layer title string
currentYCoord += mLayerSpace;
if ( !layerItem->text().isEmpty() )
{
currentYCoord += mLayerSpace;
currentYCoord += fontAscentMillimeters( mLayerFont );

//draw layer Item
@@ -214,6 +214,12 @@ void QgsComposerLegend::drawLayerItem( QPainter* p, QgsComposerLayerItem* layerI

maxXCoord = qMax( maxXCoord, 2 * mBoxSpace + textWidthMillimeters( mLayerFont, layerItem->text() ) );
}
else //layer title omited
{
//symbol space will be added before the item later
currentYCoord += (mLayerSpace - mSymbolSpace);
}

//and child items
drawLayerChildItems( p, layerItem, currentYCoord, maxXCoord, opacity );
}

0 comments on commit 9869edc

Please sign in to comment.