Feature request #2738

Legend customizations are not saved in Composer Template

Added by Horst Düster about 7 years ago. Updated 2 months ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Map Composer/Printing
Pull Request or Patch supplied: Resolution:
Easy fix?:No

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 22b3307b
Added by Nyall Dawson 2 months 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 616868ef
Added by Nyall Dawson 2 months ago

Merge pull request #4054 from nyalldawson/fix_2738

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

Revision 0b36ee3a
Added by Nyall Dawson about 1 month ago

Use weak layer references and loose matching for composer legend
customisation

Allows legend customisation to be restored when loading a composer
template

Fix #2738

History

#1 Updated by John Tull about 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.

#2 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.

#3 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.

#4 Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#5 Updated by Giovanni Manghi about 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#6 Updated by Pirmin Kalberer over 4 years ago

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

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

  • Category changed from 33 to Map Composer/Printing

#8 Updated by Nyall Dawson 2 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF