Skip to content

Commit

Permalink
Ignore getLegendGraphic URL if GetMap url is ignored (#41596)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent authored and nyalldawson committed Feb 19, 2021
1 parent 57cb687 commit 0f35847
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsnewhttpconnectionbase.ui
Expand Up @@ -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>
Expand Down

0 comments on commit 0f35847

Please sign in to comment.