@@ -32,6 +32,7 @@ QgsComposerLegend::QgsComposerLegend( QgsComposition* composition )
3232 : QgsComposerItem( composition )
3333 , mTitle( tr( " Legend" ) )
3434 , mBoxSpace( 2 )
35+ , mGroupSpace( 2 )
3536 , mLayerSpace( 2 )
3637 , mSymbolSpace( 2 )
3738 , mIconLabelSpace( 2 ), mComposerMap( 0 )
@@ -165,7 +166,7 @@ void QgsComposerLegend::drawGroupItem( QPainter* p, QgsComposerGroupItem* groupI
165166 return ;
166167 }
167168
168- currentYCoord += mLayerSpace ;
169+ currentYCoord += mGroupSpace ;
169170 currentYCoord += fontAscentMillimeters ( mGroupFont );
170171
171172 p->setPen ( QColor ( 0 , 0 , 0 ) );
@@ -642,6 +643,7 @@ bool QgsComposerLegend::writeXML( QDomElement& elem, QDomDocument & doc ) const
642643 composerLegendElem.setAttribute ( " layerFont" , mLayerFont .toString () );
643644 composerLegendElem.setAttribute ( " itemFont" , mItemFont .toString () );
644645 composerLegendElem.setAttribute ( " boxSpace" , QString::number ( mBoxSpace ) );
646+ composerLegendElem.setAttribute ( " groupSpace" , QString::number ( mGroupSpace ) );
645647 composerLegendElem.setAttribute ( " layerSpace" , QString::number ( mLayerSpace ) );
646648 composerLegendElem.setAttribute ( " symbolSpace" , QString::number ( mSymbolSpace ) );
647649 composerLegendElem.setAttribute ( " iconLabelSpace" , QString::number ( mIconLabelSpace ) );
@@ -697,6 +699,7 @@ bool QgsComposerLegend::readXML( const QDomElement& itemElem, const QDomDocument
697699
698700 // spaces
699701 mBoxSpace = itemElem.attribute ( " boxSpace" , " 2.0" ).toDouble ();
702+ mGroupSpace = itemElem.attribute ( " groupSpace" , " 3.0" ).toDouble ();
700703 mLayerSpace = itemElem.attribute ( " layerSpace" , " 3.0" ).toDouble ();
701704 mSymbolSpace = itemElem.attribute ( " symbolSpace" , " 2.0" ).toDouble ();
702705 mIconLabelSpace = itemElem.attribute ( " iconLabelSpace" , " 2.0" ).toDouble ();
0 commit comments