Skip to content
Permalink
Browse files

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

(cherry picked from commit 7031fed)
  • Loading branch information
mhugent authored and nyalldawson committed Mar 19, 2021
1 parent 42832c9 commit 2ac8d093a5b9c8723013743254788fcb60125528
Showing with 10 additions and 2 deletions.
  1. +9 −1 src/providers/wms/qgswmsprovider.cpp
  2. +1 −1 src/ui/qgsnewhttpconnectionbase.ui
@@ -3724,7 +3724,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 2ac8d09

Please sign in to comment.