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

Bugs when setting anchor preset via top bar #63784

Closed
RedMser opened this issue Aug 1, 2022 · 2 comments
Closed

Bugs when setting anchor preset via top bar #63784

RedMser opened this issue Aug 1, 2022 · 2 comments

Comments

@RedMser
Copy link
Contributor

RedMser commented Aug 1, 2022

Godot version

4.0.dev (222e489)

System information

Windows 10

Issue description

Two bugs can occur when using the top bar to set an anchor preset:
image

They do not happen when using the inspector "Anchors Preset" dropdown (maybe related to changing the "Layout Mode" dropdown from "Position" to "Anchors"?)


  1. The "Anchors Preset" setting in layout is hidden until you re-select the node (first picture is broken, second picture is fixed):
    image
    image

  1. The grow direction is not set correctly for e.g. the center preset (should be "Both" for horizontal and "Vertical"):
    22-08-01_17-44-34_Godot_v4 0-alpha11_win64_Foxhound

This was also observed in #58857 (comment) without reproduction.

Steps to reproduce

  1. Create a Control node, and a child Label node
  2. Use the top bar to select the Center anchor preset
  3. Bug 1 can be observed now
  4. Select the root node, then the Label node again, so the "Anchors Preset" setting appears
  5. Change its value to "Custom" like in the video above
  6. Bug 2 can be observed now

If you repeat this procedure with a new Label node, but use only the inspector's "Anchors Preset" setting, then these bugs do not occur.

Minimal reproduction project

No response

@RedMser
Copy link
Contributor Author

RedMser commented Aug 1, 2022

This seems to be due to

  • The inspector using the _set_anchors_layout_preset setter function, which calls set_anchors_preset, set_offsets_preset and set_grow_direction_preset
  • The top bar menu only calling set_anchors_preset

@RedMser
Copy link
Contributor Author

RedMser commented Sep 2, 2022

Fixed with #63358

@RedMser RedMser closed this as completed Sep 2, 2022
Repository owner moved this from To Assess to Done in 4.x Priority Issues Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants