Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor point legend not firmly anchored in template #27809

Closed
qgib opened this issue Oct 1, 2018 · 3 comments
Closed

Anchor point legend not firmly anchored in template #27809

qgib opened this issue Oct 1, 2018 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Map and Legend Related to map or legend rendering Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Oct 1, 2018

Author Name: Gert Jan Pieterse (Gert Jan Pieterse)
Original Redmine Issue: 19987
Affected QGIS version: 3.2.1
Redmine category:map_legend
Assignee: Nyall Dawson


I created the following layout templates with legends:

  • Legend in the upper-right corner.
  • Anchor point in the upper right corner.
  • The legend has 'auto-update' turned on.

My problem is that with a new map using this template, the legend moves. I think this is what happens:

  • The legend get rescaled with new items, making it longer / shorter and wider / smaller.
  • The upper-left corner stays at the same place as in the template.
  • The upper-right corner gets recalculated using the upper-left corner and new width.
  • The upper-right corner gets anchored again with the new position.

Calculation example:

  • template 19x19 cm page
  • legend width during making of the template: 5 cm.
  • anchor point upper-right corner: X = 19.0 cm, Y = 0.0 cm.
  • legend width in new map: 5.5 cm.
  • legend upper-left corner: X = 14.0 cm, Y = 0.0 cm.
  • legend new anchor point upper-right: X = 19.5 cm, Y = 0.0 cm.
@qgib
Copy link
Contributor Author

qgib commented Oct 10, 2018

Author Name: Harrissou Santanna (@DelazJ)


Actually, afaics no need to use a template. An anchor set for a legend in a print layout is not respected:

  1. create a legend item
  2. set an anchor other than the upper left
  3. Use the filter legend by map content : the legend is resized based on the upper left instead of the right.

This is a regression as it should have been fixed since #19617.


  • regression was changed from 0 to 1
  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Oct 15, 2018

Author Name: Nyall Dawson (@nyalldawson)


  • assigned_to_id was configured as Nyall Dawson
  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Oct 15, 2018

Author Name: Nyall Dawson (@nyalldawson)


Applied in changeset 530397c.


  • done_ratio was changed from 0 to 100
  • status_id was changed from In Progress to Closed

@qgib qgib closed this as completed Oct 15, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Map and Legend Related to map or legend rendering Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Map and Legend Related to map or legend rendering Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant