<div dir="ltr"><div>Hi all</div><div><br></div><div>I have a working python code snippet that enables updating a WMS layer with a different named style.</div><div><br></div><div>It basically manipulates the raster provider's `dataSourceUri` property, replacing the `style=` with a different substring. and then it calls for a reload of the data and triggers a repaint of the layer. Something like this:<br></div><div><br></div><div>```</div><div>provider = layer.dataProvider()<br></div><div>original_uri = provider.dataSourceUri()</div><div>new_uri = modify_uri(original_uri)</div><div>provider.setDataSourceUri(new_uri)</div><div>provider.reloadData()</div><div>provider.dataChanged.emit()<br></div><div>```</div><div><br></div><div>It is working fine and the layer is shown with the updated style. Now I'd like to have also the layer's legend be refreshed with the correct style.</div><div><br></div><div>Is this possible?</div><div><br></div><div>I've tried</div><div><br></div><div>```</div><div>iface.layerTreeView().refreshLayerSymboogy(<a href="http://layer.id">layer.id</a>())<br></div><div>```<br></div><div><br></div><div>This does not work, I am monitoring the WMS server's logs and I don't see any new `GetLegendGraphic` request being issued.</div><div><br></div><div>Thanks in advance<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">___________________________ ___ __<br>Ricardo Garcia Silva</div></div></div>