3

I am working with QGIS 3.14 and 3.16 on Mac and Windows and I am really struggling in finding a way to remove disabled map layers in the legend view of the Layout Composer. In prior versions there was this "Filter legend by map content" button (see here: https://docs.qgis.org/3.4/en/docs/user_manual/print_composer/composer_items/composer_legend.html#legend-items) but this option seems to be removed for any reason (see here https://docs.qgis.org/3.16/en/docs/user_manual/print_composer/composer_items/composer_legend.html#legend-items)

The "Filter legend by map content" button is still available from the layer panel but this is not working for the legend in the layout. I also tried the legend item checkbox "Only show items inside linked map" without any success.

Are there any ideas or hints how to solve this issue?

Maybe it can be filtered using an expression - but how is the script looking that filters all visible/enabled map layers for the layout legend

I am wondering because usually you have a lot of work data inside a GIS project and want to display only few of them on a map, so I think I am not alone with this issue. enter image description here

5
  • 1
    If you set your legend to automated update and tick only show items inside linked map this works as you want it to. Nonwithstanding the issue, that the automated legend looks... sloppy.
    – Erik
    Mar 26, 2021 at 11:26
  • or manually click the update allbutton beside the automated update box, as the later is not always catching map changes...
    – JGH
    Mar 26, 2021 at 12:05
  • Thank you, but all of that hints doesn't work (neither on 3.16 or 3.18 nor on Win or MacOS) - It tried all of those checkboxes. Mar 26, 2021 at 12:09
  • Is the link with the map properly recorded? (a bit above the auto-update box)
    – JGH
    Mar 26, 2021 at 14:42
  • If you mean, the selection of a Map in the Legend Main Properties - sure. It seems to be a bug. It looks better in 3.18 but haven't tested it properly yet Apr 8, 2021 at 5:56

2 Answers 2

1

The legend items are not active because the AutoUpdate have been switched on, you need to have that unticked then you will see all Legend items active, then you can manipulate your Legend as you prefer.enter image description here

1

Have you tried to refresh Print composer by pressing F5?

Something is wrong with your QGIS, because my QGIS 3.18.1 works fine with Only show items inside linked map option:

enter image description here

1
  • Thank you for your Video. Yes i refreshed, I also closed and reopened the composer and closed and repoend QGIS - I really tried everything ;-) But I try now 3.18 - I let you know Mar 26, 2021 at 12:37

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.