Skip to content

Commit

Permalink
[RTL] Fix clearing text with set_text("").
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Nov 25, 2024
1 parent 0c45ace commit a2b8b51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5828,7 +5828,11 @@ void RichTextLabel::set_text(const String &p_bbcode) {
stack_externally_modified = false;

text = p_bbcode;
_apply_translation();
if (text.is_empty()) {
clear();
} else {
_apply_translation();
}
}

void RichTextLabel::_apply_translation() {
Expand Down

0 comments on commit a2b8b51

Please sign in to comment.