Skip to content
Permalink
Browse files

[SERVER][BUGFIX] Layer order from group

If custom order is not enabled and a group is requested, layers was added in
 the DOM element order. The default endering order is the reverse.

To fix this issue, QgsWMSProjectParser::addLayersFromGroup has to read group
 element children from end (bottom) to start (top).
  • Loading branch information
rldhont committed Sep 15, 2015
1 parent 0701313 commit ae906b5eca9f99d7e4bd4e29e3b1bc4b49122be2
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/server/qgswmsprojectparser.cpp
@@ -258,7 +258,8 @@ void QgsWMSProjectParser::addLayersFromGroup( const QDomElement& legendGroupElem
{
QMap< int, QDomElement > layerOrderList;
QDomNodeList groupElemChildren = legendGroupElem.childNodes();
for ( int i = 0; i < groupElemChildren.size(); ++i )
// for rendering layers has to be add from bottom (end) to top (start)
for ( int i = groupElemChildren.size()-1; i >= 0 ; --i )
{
QDomElement elem = groupElemChildren.at( i ).toElement();
if ( elem.tagName() == "legendgroup" )

0 comments on commit ae906b5

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