Skip to content

Commit

Permalink
Follow up 0bda714
Browse files Browse the repository at this point in the history
Ensure that mLegendFilterByMap is set before setting the map when
reading legend xml
  • Loading branch information
nyalldawson committed Oct 21, 2014
1 parent 0bda714 commit 2b36dea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/composer/qgscomposerlegend.cpp
Expand Up @@ -353,6 +353,7 @@ bool QgsComposerLegend::readXML( const QDomElement& itemElem, const QDomDocument
mSettings.setWrapChar( itemElem.attribute( "wrapChar" ) );

//composer map
mLegendFilterByMap = itemElem.attribute( "legendFilterByMap", "0" ).toInt();
if ( !itemElem.attribute( "map" ).isEmpty() )
{
setComposerMap( mComposition->getComposerMapById( itemElem.attribute( "map" ).toInt() ) );
Expand All @@ -369,8 +370,6 @@ bool QgsComposerLegend::readXML( const QDomElement& itemElem, const QDomDocument
_readXML( composerItemElem, doc );
}

mLegendFilterByMap = itemElem.attribute( "legendFilterByMap", "0" ).toInt();

// < 2.0 projects backward compatibility >>>>>
//title font
QString titleFontString = itemElem.attribute( "titleFont" );
Expand Down

0 comments on commit 2b36dea

Please sign in to comment.