Skip to content
Permalink
Browse files

added fix for the missing category layers

  • Loading branch information
Samweli authored and nyalldawson committed Mar 1, 2020
1 parent 0facf54 commit abdef05aef097109d018c9a54319946e5c85c9b3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/wms/qgswmsdataitems.cpp
@@ -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 );
@@ -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 );

0 comments on commit abdef05

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