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

Name label for point object is not aligned properly #3400

Closed
smjnab opened this issue Jun 29, 2022 · 1 comment · Fixed by #3511
Closed

Name label for point object is not aligned properly #3400

smjnab opened this issue Jun 29, 2022 · 1 comment · Fixed by #3511
Assignees
Labels
bug Broken behavior. hacktoberfest Good thing to try for Hacktoberfest participants.

Comments

@smjnab
Copy link

smjnab commented Jun 29, 2022

Describe the bug
Since 1.9, and the change to the size of the point object, the name label is positioned at the top of the old point object size and not at the top of the new smaller point object.

To Reproduce
Steps to reproduce the behavior:
Create a new pointer object, shortcut I.
Give it a name.
See how the label is not positioned as they are for other objects with name labels.

Media
pointer

Specifications:

  • OS: KDE Neon (Ubuntu 20.04)
  • Tiled Version: 1.9.0
@smjnab smjnab added the bug Broken behavior. label Jun 29, 2022
@bjorn
Copy link
Member

bjorn commented Jun 29, 2022

Ah, I forgot about the label positioning. Thanks for opening an issue about it! Shouldn't be too hard to fix, but may have to wait until when I'm back from holiday.

@bjorn bjorn self-assigned this Aug 4, 2022
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 23, 2022
	- fixes mapeditor#3400 which notes that the labels for points are attached to a world coordinate, rather than a screenspace coordinate
		- the issue came about when points were changed from having a world-fixed size to now having a screen-fixed size, such that the annotation remains the same size when changing the zoom level of the map editor
	 - one minor issue with this fix is that the painterScale used seems to be one "frame" behind whenever we are re-rendering due to a zoom level change; this corrects itself on the next non-cached repaint (for example, by panning the map editor)
	- I have a prototype of a different fix where this one-frame lag doesn't occur but a different issue occurs; the bounding box of the label does not match where it is actually rendered and thus Qt graphics does not allow it to repaint after something was drawn over top of it
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 23, 2022
…g properly since the boundingRect differs from where we actually render!
@bjorn bjorn added the hacktoberfest Good thing to try for Hacktoberfest participants. label Oct 24, 2022
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 24, 2022
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 24, 2022
	- fixes mapeditor#3400 which notes that the labels for points are attached to a world coordinate, rather than a screenspace coordinate
		- the issue came about when points were changed from having a world-fixed size to now having a screen-fixed size, such that the annotation remains the same size when changing the zoom level of the map editor
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 26, 2022
	- fixes mapeditor#3400 which notes that the labels for points are attached to a world coordinate, rather than a screenspace coordinate
		- the issue came about when points were changed from having a world-fixed size to now having a screen-fixed size, such that the annotation remains the same size when changing the zoom level of the map editor
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 26, 2022
	- fixes mapeditor#3400 which notes that the labels for points are attached to a world coordinate, rather than a screenspace coordinate
		- the issue came about when points were changed from having a world-fixed size to now having a screen-fixed size, such that the annotation remains the same size when changing the zoom level of the map editor
lhiginbotham added a commit to lhiginbotham/tiled that referenced this issue Oct 27, 2022
	- fixes mapeditor#3400 which notes that the labels for points are attached to a world coordinate, rather than a screenspace coordinate
		- the issue came about when points were changed from having a world-fixed size to now having a screen-fixed size, such that the annotation remains the same size when changing the zoom level of the map editor
bjorn added a commit that referenced this issue Oct 27, 2022
The issue came about when points were changed from having a world-fixed 
size to now having a screen-fixed size, such that the annotation remains
the same size when changing the zoom level of the map editor.

Closes #3400

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior. hacktoberfest Good thing to try for Hacktoberfest participants.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants