Skip to content

Commit

Permalink
added fix for the missing category layers
Browse files Browse the repository at this point in the history
(cherry picked from commit abdef05)
  • Loading branch information
Samweli authored and nyalldawson committed Mar 16, 2020
1 parent aaef2dd commit 91fc058
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmsdataitems.cpp
Expand Up @@ -98,7 +98,7 @@ QVector<QgsDataItem *> QgsWMSConnectionItem::createChildren()
QString pathName = layerProperty.name.isEmpty() ? QString::number( layerProperty.orderId ) : layerProperty.name;
QgsDataItem *layer = nullptr;

if ( layerProperty.name.isEmpty() )
if ( layerProperty.name.isEmpty() || !layerProperty.layer.isEmpty() )
layer = new QgsWMSLayerCollectionItem( this, layerProperty.title, mPath + '/' + pathName, capabilitiesProperty, uri, layerProperty );
else
layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, capabilitiesProperty, uri, layerProperty );
Expand Down Expand Up @@ -285,7 +285,7 @@ QgsWMSLayerCollectionItem::QgsWMSLayerCollectionItem( QgsDataItem *parent, QStri

QgsDataItem *layer = nullptr;

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

0 comments on commit 91fc058

Please sign in to comment.