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 RichTextLabel's modified stack being wiped on translation changes #97061

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

YeldhamDev
Copy link
Member

Fixes #96937.

@YeldhamDev YeldhamDev added bug regression topic:gui cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Sep 15, 2024
@YeldhamDev YeldhamDev added this to the 4.4 milestone Sep 15, 2024
@YeldhamDev YeldhamDev requested a review from a team as a code owner September 15, 2024 22:24
@akien-mga akien-mga requested a review from bruvzg September 16, 2024 09:22
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

  • set_effects() and install_effect() use
if ((!text.is_empty()) && use_bbcode) {
	parse_bbcode(atr(text));
}

instead of

if (!text.is_empty()) {
    _apply_translation()
}

and should be updated to take stack_externally_modified into account (unlike other cases, it's only updating is bbcode is enabled).

  • remove_paragraph() should also set stack_externally_modified = true;.
  • _apply_translation() can have early if (text.is_empty()) { return; } to avoid calling parsers.

@YeldhamDev
Copy link
Member Author

@bruvzg Sorry for the wait, changes made.

Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

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

Codestyle checks out

@Repiteo Repiteo merged commit a82f4c5 into godotengine:master Nov 22, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 22, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release regression topic:gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rich text labels resetting unexpectedly when scene tree modified in game Godot 4.3-stable
3 participants