Skip to content
Permalink
Browse files
Accept also "true" for queryable/opaque/noSubsets attributes
  • Loading branch information
pathmapper authored and nyalldawson committed Nov 1, 2021
1 parent ef0d9a4 commit 28411f63c57ff5ecf9db022007d2dcda21b943cd
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/providers/wms/qgswmscapabilities.cpp
@@ -1161,10 +1161,18 @@ void QgsWmsCapabilities::parseLayer( const QDomElement &element, QgsWmsLayerProp
#endif

layerProperty.orderId = ++mLayerCount;
layerProperty.queryable = element.attribute( QStringLiteral( "queryable" ) ).toUInt();

QString queryableAttribute = element.attribute( QStringLiteral( "queryable" ) );
layerProperty.queryable = ( queryableAttribute == QLatin1String( "1" ) || queryableAttribute == QLatin1String( "true" ) );

layerProperty.cascaded = element.attribute( QStringLiteral( "cascaded" ) ).toUInt();
layerProperty.opaque = element.attribute( QStringLiteral( "opaque" ) ).toUInt();
layerProperty.noSubsets = element.attribute( QStringLiteral( "noSubsets" ) ).toUInt();

QString opaqueAttribute = element.attribute( QStringLiteral( "opaque" ) );
layerProperty.opaque = ( opaqueAttribute == QLatin1String( "1" ) || opaqueAttribute == QLatin1String( "true" ) );

QString noSubsetsAttribute = element.attribute( QStringLiteral( "noSubsets" ) );
layerProperty.noSubsets = ( noSubsetsAttribute == QLatin1String( "1" ) || noSubsetsAttribute == QLatin1String( "true" ) );

layerProperty.fixedWidth = element.attribute( QStringLiteral( "fixedWidth" ) ).toUInt();
layerProperty.fixedHeight = element.attribute( QStringLiteral( "fixedHeight" ) ).toUInt();

0 comments on commit 28411f6

Please sign in to comment.