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 committed Feb 19, 2021
1 parent 1f3a5c0 commit 7031fed
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; bool useContextualWMSLegend = mSettings.mEnableContextualLegend;


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


if ( lurl.isEmpty() ) 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"> <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="cbxIgnoreGetMapURI"> <widget class="QCheckBox" name="cbxIgnoreGetMapURI">
<property name="text"> <property name="text">
<string>Ignore GetMap/GetTile URI reported in capabilities</string> <string>Ignore GetMap/GetTile/GetLegendGraphic URI reported in capabilities</string>
</property> </property>
</widget> </widget>
</item> </item>
Expand Down

0 comments on commit 7031fed

Please sign in to comment.