Skip to content
Permalink
Browse files

Merge pull request #5400 from pblottiere/server_bugfix_visible

[server][bugfix] Fix regression by adding visible tag to layer's node in GetProjectSettings
  • Loading branch information
pblottiere committed Oct 26, 2017
2 parents d40447e + 1c9f9df commit d414822f470521d4c7dae0ef2fa5ae68b01540b9
@@ -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 );
@@ -840,7 +846,6 @@ namespace QgsWms

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

@@ -128,7 +128,7 @@ Content-Type: text/xml; charset=utf-8
<BoundingBox maxy="5.60604e+06" maxx="913283" miny="5.60599e+06" CRS="EPSG:3857" minx="913171"/>
<BoundingBox maxy="8.20416" maxx="44.9016" miny="8.20315" CRS="EPSG:4326" minx="44.9012"/>
<TreeName>QGIS Test Project</TreeName>
<Layer geometryType="Point" queryable="1" displayField="name">
<Layer geometryType="Point" queryable="1" displayField="name" visible="1">
<Name>testlayer èé</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>

0 comments on commit d414822

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