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

Fix pressing Enter being ignored in "Create Shader" dialog #84539

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

synalice
Copy link
Contributor

@synalice synalice commented Nov 6, 2023

Closes #84433.
I've compiled the code with this change and it does fix the issue.

However, I don't have a good understanding of the underlying code. I would be very glad is someone would explain it to me.

  • What does this register_text_enter(file_path); method do?
  • Where exactly is Enter button is being handled? What if I want to change this button, for example?

@synalice synalice requested a review from a team as a code owner November 6, 2023 17:33
@AThousandShips AThousandShips added this to the 4.3 milestone Nov 6, 2023
@YuriSizov YuriSizov modified the milestones: 4.3, 4.2 Nov 6, 2023
@YuriSizov YuriSizov requested a review from KoBeWi November 6, 2023 18:09
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For your question, you can find the code here:

godot/scene/gui/dialogs.cpp

Lines 197 to 203 in 4c96e96

void AcceptDialog::register_text_enter(Control *p_line_edit) {
ERR_FAIL_NULL(p_line_edit);
LineEdit *line_edit = Object::cast_to<LineEdit>(p_line_edit);
if (line_edit) {
line_edit->connect("text_submitted", callable_mp(this, &AcceptDialog::_text_submitted));
}
}

It basically connects a LineEdit signal to close the dialog on submit.

@YuriSizov YuriSizov merged commit 30bae5b into godotengine:master Nov 7, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks! And congrats on your first merged Godot PR!

@synalice synalice deleted the issue-84433 branch November 8, 2023 07:02
@synalice
Copy link
Contributor Author

I've noticed that this PR didn't make it to the beta5 version. How so? What is the release workflow with these things?

(not trying to be rude here, I'm just genuinely interested to know how this works)

@akien-mga
Copy link
Member

Beta 5 was built from 4c96e96, merged on November 6. Your PR was merged on November 7, so it's not included. It takes several hours to build a beta so there's a difference between the timing of the commit it's built from, and the release announcement.

@synalice
Copy link
Contributor Author

Oh, yeah, makes sense, thx!

@synalice synalice restored the issue-84433 branch November 11, 2023 11:45
@synalice synalice deleted the issue-84433 branch November 11, 2023 11:47
@akien-mga akien-mga changed the title Fix pressing Enter being ignored in "Create Shader" dialogue Fix pressing Enter being ignored in "Create Shader" dialog Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.2 beta 4] Pressing Enter after typing file name no longer confirms "Create Shader" dialogue
5 participants