Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes regression by adding visible tag to layer's node
  • Loading branch information
pblottiere committed Oct 26, 2017
1 parent d40447e commit 3c9e719
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -828,6 +828,12 @@ namespace QgsWms
{
QgsLayerTreeNode *treeNode = layerTreeGroupChildren.at( i );
QDomElement layerElem = doc.createElement( QStringLiteral( "Layer" ) );

if ( projectSettings )
{
layerElem.setAttribute( QStringLiteral( "visible" ), treeNode->isVisible() );
}

if ( treeNode->nodeType() == QgsLayerTreeNode::NodeGroup )
{
QgsLayerTreeGroup *treeGroupChild = static_cast<QgsLayerTreeGroup *>( treeNode );
Expand All @@ -840,7 +846,6 @@ namespace QgsWms

if ( projectSettings )
{
layerElem.setAttribute( QStringLiteral( "visible" ), treeGroupChild->isVisible() );
layerElem.setAttribute( QStringLiteral( "mutuallyExclusive" ), treeGroupChild->isMutuallyExclusive() );
}

Expand Down

0 comments on commit 3c9e719

Please sign in to comment.