mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Some refactoring https://github.com/qgis/QGIS/pull/7462
This commit is contained in:
parent
eec843c62d
commit
5280ab033a
@ -189,16 +189,11 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !projectDom.setContent( &projectFile ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ( !projectDom.setContent( &projectFile ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( !projectDom.setContent( &projectFile ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user