Feature request #2738

Legend customizations are not saved in Composer Template

Added by Horst Düster almost 7 years ago. Updated 8 days ago.

Status:Closed Start Date:
Priority:Low Due date:
Assigned to:Marco Hugentobler % Done:

0%

Category:Map Composer / Printing
Target version:Future Release - Nice to have
Platform:All Resolution:
Platform version: Pull Request or Patch supplied:
Status info:0 Tag:

Description

1. Create a composer legend group and add some items
2. Save the composer map as template
3. Reload the saved composer template
4. The legend group does exist no longer

Associated revisions

Revision 22b3307bdd42f40525b2d07e5e0a66ee61c46124
Added by Nyall Dawson 8 days ago

[composer] Restore legend customisation from composer templates

This change allows customised legends within composer templates
to be correctly restored when creating a new composition from
the template in a different project.

The legend layers will be attached to any loaded layers with a
matching data source as the layer from the original template
composition.

Fix #2738

Sponsored by ENEL, on behalf of Faunalia

Revision 616868efbeb72633fd0798efeaee05e75a92de71
Added by Nyall Dawson 8 days ago

Merge pull request #4054 from nyalldawson/fix_2738

[composer] Restore legend customisation from composer templates (Fix #2738)

History

Updated by John Tull almost 7 years ago

Additionally, no information regarding customized legends is preserved when a template is loaded. Try creating a composer item, add a legend, then delete a few items. Add another with those items only. Save the template and load it in a new composer. All legend instances will be populated with every item in the map canvas.

My guess is these two items are related. Effectively, legend instances are not having any information saved other than location and font information.

I've changed the bug title from "Grouped Legend Items are not saved in Composer Template" to reflect this more general problem.

Updated by Marco Hugentobler almost 7 years ago

The legend structure is saved in the template (see content of the xml file). However, a template can be opened in a project with totally different layers and therefore is expected to not restore the saved legend content (otherwise, the legend content would be wrong if opening the template in other projects).

It would however make sense to add a test if the legend id is present in the project.

Updated by Marco Hugentobler almost 7 years ago

changing to enhancement. Current behaviour is correct, but automatically trying to create a 'best fit' would be perfect.

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi almost 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by Jürgen Fischer almost 3 years ago

  • Category changed from 33 to Map Composer / Printing

Updated by Nyall Dawson 8 days ago

  • Status changed from Open to Closed

Also available in: Atom