Bug report #11293

Auto update Shows All Layers

Added by ramon . almost 5 years ago. Updated 6 months ago.

Status:Closed
Priority:High
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:2.18.4 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:19589

Description

  • In 2.4 in the print composer, as a default the legend has Auto update on, but only shows layers that are visible on the map window (2-4AutoUpdateShowsVisibles).
  • In master (b044d4d) the print composer, with the default Auto update on the legend shows all layers, regardless of whether they are visible on the map (AutoUpdateShowsEverything).

- I think that showing layers in the legend that are not on the map is a bug, in this case a regression.

  • In master this is further complicated by the Auto label option locking all of the tools, except filter, which means the legend can't be fixed without turning Auto update off. The filter (I'm getting inconsistent results with this) might reduce the items to what is visible, but still leaves object headers for layers that are not on the map.

- I suspect that neither of these outcomes are intended.

Question: in the goal of the auto update to provide an auto list of legend items?
If this is the case, then putting the filter on as a default may also be a good idea.

2-4AutoUpdateShowsVisibles.png - Current behaviour - only visible layers shown. (101 KB) ramon ., 2014-09-29 10:46 PM

AutoUpdateShowsEverything.png - Master behaviour - shows all layers: visible and not (162 KB) ramon ., 2014-09-29 10:46 PM

AutoUpdateShowsEverything-filtered.png - Applying filter leaves not visible layer object headers behind. (140 KB) ramon ., 2014-09-29 10:46 PM


Related issues

Related to QGIS Application - Bug report #13575: "Add a Legend" adds ALL the layers in the project instead... Closed 2015-10-12
Duplicated by QGIS Application - Feature request #18579: More intuitive Legend Items when adding legend to layout Closed 2018-03-29

History

#1 Updated by Nyall Dawson almost 5 years ago

  • Assignee set to Martin Dobias

Related to refactoring of legend, so assigning to Martin

#2 Updated by Giovanni Manghi almost 5 years ago

  • Operating System deleted (win7-64bit)
  • OS version deleted (2.4, master)

confirmed on the latest master.

#3 Updated by Olivier Monod almost 5 years ago

  • Assignee deleted (Martin Dobias)

#4 Updated by Olivier Monod almost 5 years ago

  • Assignee set to Martin Dobias

#5 Updated by Alessandro Ciali almost 5 years ago

One further point on this feature: putting Auto Update on by default regardless of the status saved in the project resets all the settings made for the legends. This is very annoying, because changing from 2.4 to 2.5 (and I guess 2.6) needs to rebuild all the legend saved in previous version.
Could the option "Auto Update" be disabled by default?

#6 Updated by Martin Dobias almost 5 years ago

  • Priority changed from Severe/Regression to High

The second issue (with layer titles being visible with filtering enabled even if the layer is not visible) is now fixed (4ac94f).

The auto-update has now a different meaning - in QGIS <= 2.4 it allowed to keep the legend nodes per layer up to date with changes to the renderer. In QGIS master (2.6) this is now always true - legend nodes for each layer are synchronized whenever there is a change to the renderer. Auto-update now means that layer tree used for composer map is synchronized with the layer tree in the main window - if you change the order of layers / groups, the composer legend will be updated immediately. That also means that the items are read-only with auto-update enabled.

Unfortunately I haven't realized that composer legend used to show just active map layers - not all. I think for 2.6 it is now too late to bring that functionality back. On the other hand, the "filter by map" functionality should give you more or less the same result now (if not better thanks to hiding symbols that are not used).

@Alessandro: in e02e7c I have implemented backward compatibility for projects for QGIS <= 2.4 - so you should not need to rebuild your legends anymore. Most of the settings are preserved now, with the exception of customization of individual symbols (user text, change of order).

Now I believe the only missing thing really is to show in legend by default just layers that are used for composer map rendering (instead of all layers). At this point I think this bug is not a blocker anymore, thus lowering the priority.

#7 Updated by Jürgen Fischer almost 5 years ago

  • Target version changed from Version 2.6 to Future Release - High Priority

#8 Updated by Harrissou Santanna over 4 years ago

Martin Dobias wrote:

The second issue (with layer titles being visible with filtering enabled even if the layer is not visible) is now fixed (4ac94f).

I think empty groups should also be avoided in this case. If none of the layers in the group is shown in the map/legend, this group should be skipped in the legend list. It's a bit ugly when you get many empty group names in your legend

The auto-update has now a different meaning - in QGIS <= 2.4 it allowed to keep the legend nodes per layer up to date with changes to the renderer. In QGIS master (2.6) this is now always true - legend nodes for each layer are synchronized whenever there is a change to the renderer. Auto-update now means that layer tree used for composer map is synchronized with the layer tree in the main window - if you change the order of layers / groups, the composer legend will be updated immediately. That also means that the items are read-only with auto-update enabled.

Good to know this; I'll stop wondering why I can no more change my legend labels. Such valuable information is not available in the documentation which 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.

#9 Updated by Jürgen Fischer about 3 years ago

  • Assignee deleted (Martin Dobias)

#10 Updated by Giovanni Manghi over 2 years ago

  • Target version deleted (Future Release - High Priority)
  • Priority changed from High to Normal
  • Status changed from Open to Feedback

What is the status of this issue in recent QGIS releases?

#11 Updated by Harrissou Santanna over 2 years ago

All the points are still valid:
- Auto-update is on by default without filtering the map: when a legend is created, all the layer panel is added
- Groups without any visible layer are shown in the legend (unless you filter by map)

#12 Updated by Giovanni Manghi over 2 years ago

Harrissou Santanna wrote:

All the points are still valid:
- Auto-update is on by default without filtering the map: when a legend is created, all the layer panel is added
- Groups without any visible layer are shown in the legend (unless you filter by map)

on 2.18.4 or master or both?

#13 Updated by Harrissou Santanna over 2 years ago

Both

#14 Updated by Giovanni Manghi over 2 years ago

  • Target version set to Version 2.18
  • Status changed from Feedback to Open
  • Priority changed from Normal to Severe/Regression
  • Affected QGIS version changed from master to 2.18.4

#15 Updated by Giovanni Manghi over 2 years ago

  • Regression? set to Yes

#16 Updated by Giovanni Manghi over 2 years ago

  • Priority changed from Severe/Regression to High

#17 Updated by Giovanni Manghi over 2 years ago

  • Easy fix? set to No

#18 Updated by Harrissou Santanna over 1 year ago

#19 Updated by Giovanni Manghi 6 months ago

  • Status changed from Open to Closed
  • Resolution set to end of life

End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/

QGIS 3.4 has recently become our new Long Term Release (LTR) version. This is a major step in our history – a long term release version based on the massive updates, library upgrades and improvements that we carried out in the course of the 2.x to 3x upgrade cycle.

We strongly encourage all users who are currently using QGIS 2.18 LTR as their preferred QGIS release to migrate to QGIS 3.4. This new LTR version will receive regular bugfixes for at least one year. It also includes hundreds of new functions, usability improvements, bugfixes, and other goodies. See the relevant changelogs for a good sampling of all the new features that have gone into version 3.4

Most plugins have been either migrated or incorporated into the core QGIS code base.

We strongly discourage the continued use of QGIS 2.18 LTR as it is now officially unsupported, which means we’ll not provide any bug fix releases for it.

You should also note that we intend to close all bug tickets referring to the now obsolete LTR version. Original reporters will receive a notification of the ticket closure and are encouraged to check whether the issue persists in the new LTR, in which case they should reopen the ticket.

If you would like to better understand the QGIS release roadmap, check out our roadmap page! It outlines the schedule for upcoming releases and will help you plan your deployment of QGIS into an operational environment.

The development of QGIS 3.4 LTR has been made possible by the work of hundreds of volunteers, by the investments of companies, professionals, and administrations, and by continuous donations and financial support from many of you. We sincerely thank you all and encourage you to collaborate and support the project even more, for the long term improvement and sustainability of the QGIS project.

Also available in: Atom PDF