This commit is contained in:
Thibault Coupin 2018-07-24 21:21:07 +02:00
parent eec843c62d
commit 5280ab033a
2 changed files with 12 additions and 16 deletions

View File

@ -189,16 +189,11 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
{
return;
}
}
if ( !projectDom.setContent( &projectFile ) )
{
return;
}
} else {
if ( !projectDom.setContent( &projectFile ) )
{
return;
}
if ( !projectDom.setContent( &projectFile ) )
{
return;
}

View File

@ -2416,13 +2416,14 @@ namespace QgsWms
for ( const QgsLayerTreeNode *child : group->children() )
{
if ( child->nodeType() == QgsLayerTreeNode::NodeGroup )
{
QString shortName = child->customProperty( QStringLiteral( "wmsShortName" ) ).toString();
QString name = child->name();
if ( !shortName.isEmpty() )
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), shortName );
else
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), name );
{
QString name = child->customProperty( QStringLiteral( "wmsShortName" ) ).toString();
if ( name.isEmpty() )
name = child->name();
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), name );
}
}
}