File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -189,16 +189,11 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
189
189
{
190
190
return ;
191
191
}
192
+ }
192
193
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 ;
202
197
}
203
198
204
199
Original file line number Diff line number Diff line change @@ -2416,13 +2416,14 @@ namespace QgsWms
2416
2416
for ( const QgsLayerTreeNode *child : group->children () )
2417
2417
{
2418
2418
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
+
2426
2427
}
2427
2428
}
2428
2429
}
You can’t perform that action at this time.
0 commit comments