Skip to content
Permalink
Browse files

fix closing collection after update issue

  • Loading branch information
Samweli authored and nyalldawson committed Jan 8, 2020
1 parent 0ea64e4 commit 6a5230285382a46353c11d053ef45073dd676830
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/providers/wms/qgswmsdataitems.cpp
@@ -103,7 +103,7 @@ QVector<QgsDataItem *> QgsWMSConnectionItem::createChildren()
else
layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, capabilitiesProperty, uri, layerProperty );

children << layer ;
children.append( layer );
}
}

@@ -251,12 +251,8 @@ QgsWMSLayerCollectionItem::QgsWMSLayerCollectionItem( QgsDataItem *parent, QStri
// Attention, the name may be empty
QgsDebugMsgLevel( QString::number( layerProperty.orderId ) + ' ' + layerProperty.name + ' ' + layerProperty.title, 2 );
QString pathName = layerProperty.name.isEmpty() ? QString::number( layerProperty.orderId ) : layerProperty.name;
QgsDataItem *layer;

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 );
QgsWMSLayerItem *layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, mCapabilitiesProperty, dataSourceUri, layerProperty );

addChildItem( layer );
}

0 comments on commit 6a52302

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