Skip to content
Permalink
Browse files

Fix layer order list in GetProjectSettings

  • Loading branch information
mhugent committed Feb 19, 2014
1 parent 34f79cf commit 988099b9d80c9ef64d31c6f7dba49646d13fd4c8
Showing with 19 additions and 1 deletion.
  1. +19 −1 src/mapserver/qgsprojectparser.cpp
@@ -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;

0 comments on commit 988099b

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