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

feat: handle correctly landscape labels with negative angle #4176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martignoni
Copy link
Contributor

@martignoni martignoni commented Mar 4, 2025

Description

Fixes #4174

Screenshots (if appropriate):

correct-labels

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: macOS Sequioa 15.3.1
  • Graphics Card: Radeon Pro 580X 8 Go

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- See issue Stellarium#4174.
- This also fixes a placement bug when angle = 0.
Copy link

github-actions bot commented Mar 4, 2025

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@alex-w alex-w added this to the 25.1 milestone Mar 4, 2025
@gzotti
Copy link
Member

gzotti commented Mar 4, 2025

At zero degrees the label has to be centered over (or in your case, under) the line. This was by design, not error.

@gzotti
Copy link
Member

gzotti commented Mar 4, 2025

I don't think this was intended either.
stellarium-145

@martignoni
Copy link
Contributor Author

At zero degrees the label has to be centered over (or in your case, under) the line. This was by design, not error.

Indeed, but with current implementation, there're not centered.

Screenshot with current implementation.

current

Screenshot with this PR change

new-fixed

@martignoni
Copy link
Contributor Author

I don't think this was intended either.

Can you please share this landscape (at least its gazetteer file) so that I can test?

@gzotti
Copy link
Member

gzotti commented Mar 5, 2025

I am talking about the appearance of the gazetter labels so far (above landscape), not your way (not originally developed). It's part of the Callanish3D package. Just that I edited it and made negative altitude offsets. Presumably you did the same, but you did not show your gazetteer either...
You can probably configure some points above, some below in your branch and see how they rotate. In any case, angle=0 implies "centered".

@martignoni
Copy link
Contributor Author

It's part of the Callanish3D package.

Thanks.

you did not show your gazetteer either

My gazetteer file is attached to the original issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Gazetteer labels misplaced when degrees-towards-zenith are negative
3 participants