mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[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).
This commit is contained in:
parent
7065762b5c
commit
8948721991
@ -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" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user