1

I have a project with many layers. Some layers are objects of interest while other layers are custom layers. Simplified example:

  • Streets (polygon)
  • Buildings (polygon)
  • Street names (point)

I created a print layout and now I want to add a dynamic legend. The legend should update automatically if I change the color of a layer, but I do not want to see some layers in the legends. I want only the polygons of the streets and houses, but not the street names point in the legend.

If I remove the check in "update automatically" in order to remove or add items the legend loses the update option. So if I change the color of the roads the legend shows the old color.

How can I update the legend with layer style changes, without losing my changes to which layers are displayed?

  • When you uncheck "update automatically", just click on refresh view button, it should be updated unless you are locking the layer that you want to update its color. In this case you need to unlock the layer and click the refresh view button. – ahmadhanb Feb 12 at 13:59
  • No, maybe I did not explain well. if I remove the layer of street names from the legend (I have to remove the check to "update automatically) so if I change a color of a layer and I want to update by clicking on update it also re-inserts the layer I had removed. I use QGIS 2.18.16 – titino Feb 12 at 14:08
  • If you want to keep street names and remove the point style, you can set the point style to No Symbols and just keep the labels. Can this option solve your problem? – ahmadhanb Feb 12 at 14:22
  • no, because the layer name appear in the legend – titino Feb 12 at 14:25
  • But you can delete the layer name from the table of contents as a workaround. Go to layer properties -> General -> Layer name -> delete. Or simply select the layer, click on F2 delete the layer name. – ahmadhanb Feb 12 at 14:29
2

Uncheck 'auto-update' as indicated in the comments to remove the unwanted layer(s) from the legend. After you make any changes to styles, press "Refresh view" (blue 'recycle' button) in the layout screen and your changes will now appear in both the map and the legend without adding the unwanted layer back into the legend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.