In QGIS, in the Print Composer's Legend function, how do I make it so that the Legend automatically displays only the active layers (i.e. the layers that are checked and therefore displayed on the map)?

If I check the "Auto-Update" box, it just generates a list of ALL the layers (including the inactive ones), and I have to manually go back and remove the inactive layers from the Legend which gets to be quite a pain after a while.


2 Answers 2


Use the "Filter Legend by map Content" button. Filter legend by map Content

The legend updates and only in the map visible layers are present in the legend (referring to QGIS Version 2.18.6).


I'm affraid it's not possible this way now.

QGIS documentation says: "The legend will be updated automatically if checkbox Auto-update is checked. When Auto-update is unchecked this will give you more control over the legend items. The icons below the legend items list will be activated." so its not well specified.

Now it works that legend updating ALL layers in project (when you remove one from project its also removed from legend), but updating active/inactive layers will be more useful. According to this and this bug report it's maybe a bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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