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

Make signal connections dialog method picker respect bind/unbind #92465

Merged

Conversation

Frefreak
Copy link
Contributor

This PR makes the signal connection dialog respect bind/unbind setup when picking filtered methods (compatible search)

Previously the "select method" dialog only consider the signal method, which will result in a wrong set of methods to choose if bind/unbind is used.

For example a signal without argument, but with bind argument setting to int:
image

In this case the valid target function signature should have a argument of type int

before:

the editor still shows a list of methods without argument

image

after this PR:

correctly filter out the valid functions

image


note that when unbind is also used, bind setup will be ignored (this is in sync with the current behavior of the editor).
if this proposal is implemented then the filter behavior can be adjusted easily.

Also a side note: this PR does NOT fixes #84058
I intended to but after inspection I found that is because custom classes do not appear in ClassDB so the object parent check will be rejected, I failed to find an obvious way to fix that currently.

@Chaosus Chaosus added this to the 4.3 milestone May 28, 2024
@akien-mga akien-mga changed the title make signal connections dialog method picker respect bind/unbind Make signal connections dialog method picker respect bind/unbind May 28, 2024
@akien-mga akien-mga requested a review from KoBeWi May 28, 2024 14:07
@akien-mga akien-mga merged commit d522c20 into godotengine:master Jun 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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