Skip to content
Permalink
Browse files

[composer] fix vertical spacing of hidden layer title in legend items (

…fix #9498)
  • Loading branch information
nirvn committed Feb 16, 2014
1 parent 1607759 commit d102a79aa94d8225bc41b42e05b134da513e1048
Showing with 7 additions and 10 deletions.
  1. +7 −10 src/core/composer/qgscomposerlegend.cpp
@@ -265,7 +265,7 @@ QSizeF QgsComposerLegend::drawLayerItemTitle( QgsComposerLayerItem* layerItem, Q
if ( !layerItem ) return size;

//Let the user omit the layer title item by having an empty layer title string
if ( layerItem->text().isEmpty() ) return size;
if ( layerItem->text().isEmpty() || layerItem->style() == QgsComposerLegendStyle::Hidden ) return size;

double y = point.y();

@@ -805,15 +805,12 @@ QList<QgsComposerLegend::Atom> QgsComposerLegend::createAtomList( QStandardItem*
{
Atom atom;

if ( currentLegendItem->style() != QgsComposerLegendStyle::Hidden )
{
Nucleon nucleon;
nucleon.item = currentLegendItem;
nucleon.size = drawLayerItemTitle( dynamic_cast<QgsComposerLayerItem*>( currentLegendItem ) );
atom.nucleons.append( nucleon );
atom.size.rwidth() = nucleon.size.width();
atom.size.rheight() = nucleon.size.height();
}
Nucleon nucleon;
nucleon.item = currentLegendItem;
nucleon.size = drawLayerItemTitle( dynamic_cast<QgsComposerLayerItem*>( currentLegendItem ) );
atom.nucleons.append( nucleon );
atom.size.rwidth() = nucleon.size.width();
atom.size.rheight() = nucleon.size.height();

QList<Atom> layerAtoms;

0 comments on commit d102a79

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