1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #88598 from YeldhamDev/this_wasnt_even_my_bug!

Fix `RichTextLabel`'s tag stack being overridden on translation change
This commit is contained in:
Rémi Verschelde
2024-02-20 17:27:42 +01:00
committed by GitHub

View File

@@ -5650,10 +5650,15 @@ void RichTextLabel::set_text(const String &p_bbcode) {
}
void RichTextLabel::_apply_translation() {
// If `text` is empty, it could mean that the tag stack is being used instead. Leave it be.
if (text.is_empty()) {
return;
}
String xl_text = atr(text);
if (use_bbcode) {
parse_bbcode(xl_text);
} else { // raw text
} else { // Raw text.
clear();
add_text(xl_text);
}