Skip to content

Commit

Permalink
Some refactoring #7462
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoupin committed Jul 24, 2018
1 parent eec843c commit 5280ab0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
13 changes: 4 additions & 9 deletions src/app/qgsprojectlayergroupdialog.cpp
Expand Up @@ -189,16 +189,11 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
{
return;
}
}

if ( !projectDom.setContent( &projectFile ) )
{
return;
}
} else {
if ( !projectDom.setContent( &projectFile ) )
{
return;
}
if ( !projectDom.setContent( &projectFile ) )
{
return;
}


Expand Down
15 changes: 8 additions & 7 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -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 );

}
}
}
Expand Down

0 comments on commit 5280ab0

Please sign in to comment.