Skip to content

Commit 5280ab0

Browse files
committedJul 24, 2018
Some refactoring #7462
1 parent eec843c commit 5280ab0

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed
 

‎src/app/qgsprojectlayergroupdialog.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,11 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
189189
{
190190
return;
191191
}
192+
}
192193

193-
if ( !projectDom.setContent( &projectFile ) )
194-
{
195-
return;
196-
}
197-
} else {
198-
if ( !projectDom.setContent( &projectFile ) )
199-
{
200-
return;
201-
}
194+
if ( !projectDom.setContent( &projectFile ) )
195+
{
196+
return;
202197
}
203198

204199

‎src/server/services/wms/qgswmsrenderer.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,13 +2416,14 @@ namespace QgsWms
24162416
for ( const QgsLayerTreeNode *child : group->children() )
24172417
{
24182418
if ( child->nodeType() == QgsLayerTreeNode::NodeGroup )
2419-
{
2420-
QString shortName = child->customProperty( QStringLiteral( "wmsShortName" ) ).toString();
2421-
QString name = child->name();
2422-
if ( !shortName.isEmpty() )
2423-
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), shortName );
2424-
else
2425-
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), name );
2419+
{
2420+
QString name = child->customProperty( QStringLiteral( "wmsShortName" ) ).toString();
2421+
2422+
if ( name.isEmpty() )
2423+
name = child->name();
2424+
2425+
initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), name );
2426+
24262427
}
24272428
}
24282429
}

0 commit comments

Comments
 (0)
Please sign in to comment.