Bug report #1515
wms layer is added even if the the request fails
|Category:||Web Services clients/WMS|
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||Copied to github as #:||11575|
When a WMS layer is added and the requests fails, the layer is added anyway in the legend. The result is that if the layer is not removed by hand from the legend, any action (zoom, pan, add/remove other layers) will produce the error shown when the initial request failed.
If the wms layer cannot be retrieved it should not be added to the legend.
I noticed this behavior when I mistakenly used the wrong URL while adding a new wms server connection:
The first URL gives a list of layers but a error is returned when you try to add them, still they are added to the legend.