Skip to content

Commit 2b36dea

Browse files
committedOct 21, 2014
Follow up 0bda714
Ensure that mLegendFilterByMap is set before setting the map when reading legend xml
1 parent 0bda714 commit 2b36dea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/core/composer/qgscomposerlegend.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ bool QgsComposerLegend::readXML( const QDomElement& itemElem, const QDomDocument
353353
mSettings.setWrapChar( itemElem.attribute( "wrapChar" ) );
354354

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

372-
mLegendFilterByMap = itemElem.attribute( "legendFilterByMap", "0" ).toInt();
373-
374373
// < 2.0 projects backward compatibility >>>>>
375374
//title font
376375
QString titleFontString = itemElem.attribute( "titleFont" );

0 commit comments

Comments
 (0)
Please sign in to comment.