diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-30 22:13:59 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-30 22:13:59 +0200 |
commit | 505da68b261be6ed37b42422c61358ff9d208748 (patch) | |
tree | 0e48620d5e1a604c7ecb480ddd21df0a9f24e8b6 | |
parent | 7ba29c0f6ee2c1452d0b80017d537cb1f412c564 (diff) | |
parent | 3a52e0f5fda95741248476644662ae5ce89e8339 (diff) | |
download | redot-engine-505da68b261be6ed37b42422c61358ff9d208748.tar.gz |
Merge pull request #92565 from bruvzg/rtl_clear_flags
[RTL] Clear default justification flags if custom are set.
-rw-r--r-- | scene/gui/rich_text_label.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index f6942ca206..49db379853 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -4538,6 +4538,7 @@ void RichTextLabel::append_text(const String &p_bbcode) { if (subtag_a.size() == 2) { if (subtag_a[0] == "justification_flags" || subtag_a[0] == "jst") { Vector<String> subtag_b = subtag_a[1].split(","); + jst_flags = 0; // Clear flags. for (const String &E : subtag_b) { if (E == "kashida" || E == "k") { jst_flags.set_flag(TextServer::JUSTIFICATION_KASHIDA); @@ -4551,7 +4552,7 @@ void RichTextLabel::append_text(const String &p_bbcode) { jst_flags.set_flag(TextServer::JUSTIFICATION_SKIP_LAST_LINE); } else if (E == "skip_last_with_chars" || E == "sv") { jst_flags.set_flag(TextServer::JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS); - } else if (E == "do_not_skip_singe" || E == "ns") { + } else if (E == "do_not_skip_single" || E == "ns") { jst_flags.set_flag(TextServer::JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE); } } |