Skip to content

Commit

Permalink
Fix layer order list in GetProjectSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Feb 19, 2014
1 parent 34f79cf commit 988099b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/mapserver/qgsprojectparser.cpp
Expand Up @@ -4080,7 +4080,25 @@ void QgsProjectParser::addDrawingOrderEmbeddedGroup( const QDomElement& groupEle
return;
}

QDomNodeList layerNodeList = doc->elementsByTagName( "legendlayer" );
//find requested group
QString groupName = groupElem.attribute( "name" );
QDomElement embeddedGroupElem; //group element in source project file
QDomNodeList groupList = doc->elementsByTagName( "legendgroup" );
for ( int i = 0; i < groupList.size(); ++i )
{
if ( groupList.at( i ).toElement().attribute( "name" ) == groupName )
{
embeddedGroupElem = groupList.at( i ).toElement();
break;
}
}

if ( embeddedGroupElem.isNull() ) //group does not exist in project file
{
return;
}

QDomNodeList layerNodeList = embeddedGroupElem.elementsByTagName( "legendlayer" );
QDomElement layerElem;
QStringList layerNames;
QString layerName;
Expand Down

0 comments on commit 988099b

Please sign in to comment.