Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 9869edc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/composer/qgscomposerlegend.cpp
Expand Up @@ -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
Expand All @@ -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 );
}
Expand Down

0 comments on commit 9869edc

Please sign in to comment.