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

draw() signal is emitted twice on Control Nodes but not Node2d #97507

Closed
gitsomebit opened this issue Sep 26, 2024 · 2 comments · Fixed by #97328
Closed

draw() signal is emitted twice on Control Nodes but not Node2d #97507

gitsomebit opened this issue Sep 26, 2024 · 2 comments · Fixed by #97328

Comments

@gitsomebit
Copy link

gitsomebit commented Sep 26, 2024

Tested versions

  • Reproducable in 4.3 stable
  • not present in 4.2 stable

System information

Windows 10 - Godot 4.3

Issue description

The draw signal is emitted twice instead of once for Control nodes.
For Node2d it is still emitted once (like in previous version 4.2 stable).

Steps to reproduce

create a new scene with a Control node and bind the draw signal to a function. it will emitt twice

extends Control

func _ready() -> void:
	$".".draw.connect(control_is_drawn)

func control_is_drawn() -> void:
	print("control_is_drawn")

Minimal reproduction project (MRP)

MRP: double_draw_4.3.zip

@gitsomebit
Copy link
Author

I did some more investigating and found that the behaviour of the sorting signal changed as well from 4.2 to 4.3 with less sorting taking place in 4.3 (maybe to the detrement of more drawing)

MRP: node_sorting.zip

running the MRP will result in diffrent output for 4.2 and 4.3:
4 2
4 3

@AThousandShips
Copy link
Member

The double draw is fixed by:

Please open a separate issue for the sorting part

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

Successfully merging a pull request may close this issue.

3 participants