Skip to content
Permalink
Browse files

Ignore getLegendGraphic URL if GetMap url is ignored (#41596)

  • Loading branch information
mhugent authored and nyalldawson committed Feb 19, 2021
1 parent 57cb687 commit 0f35847ad4839c896cf8373c67b4f9aba6eaf551
Showing with 10 additions and 2 deletions.
  1. +9 −1 src/providers/wms/qgswmsprovider.cpp
  2. +1 −1 src/ui/qgsnewhttpconnectionbase.ui
@@ -3723,7 +3723,15 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle &
{
bool useContextualWMSLegend = mSettings.mEnableContextualLegend;

QString lurl = getLegendGraphicUrl();
QString lurl;
if ( mSettings.mIgnoreGetMapUrl )
{
lurl = mSettings.mBaseUrl;
}
else
{
lurl = getLegendGraphicUrl();
}

if ( lurl.isEmpty() )
{
@@ -119,7 +119,7 @@
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="cbxIgnoreGetMapURI">
<property name="text">
<string>Ignore GetMap/GetTile URI reported in capabilities</string>
<string>Ignore GetMap/GetTile/GetLegendGraphic URI reported in capabilities</string>
</property>
</widget>
</item>

0 comments on commit 0f35847

Please sign in to comment.