Skip to content
Permalink
Browse files

returned the check for possible nested parent layers

  • Loading branch information
Samweli authored and nyalldawson committed Jan 13, 2020
1 parent d23124d commit b6905287a7d344135e91fd41c6a0ac81a6b31f2b
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/wms/qgswmsdataitems.cpp
@@ -252,7 +252,12 @@ QgsWMSLayerCollectionItem::QgsWMSLayerCollectionItem( QgsDataItem *parent, QStri
QgsDebugMsgLevel( QString::number( layerProperty.orderId ) + ' ' + layerProperty.name + ' ' + layerProperty.title, 2 );
QString pathName = layerProperty.name.isEmpty() ? QString::number( layerProperty.orderId ) : layerProperty.name;

QgsWMSLayerItem *layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, mCapabilitiesProperty, dataSourceUri, layerProperty );
QgsDataItem *layer = nullptr;

if ( layerProperty.name.isEmpty() )
layer = new QgsWMSLayerCollectionItem( this, layerProperty.title, mPath + '/' + pathName, capabilitiesProperty, dataSourceUri, layerProperty );
else
layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, mCapabilitiesProperty, dataSourceUri, layerProperty );

addChildItem( layer );
}

0 comments on commit b690528

Please sign in to comment.
You can’t perform that action at this time.