diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-30 09:58:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 09:58:23 +0200 |
commit | 655a913e2273b41037df80ae00c11bed9f98d9a9 (patch) | |
tree | 65e6c8cb182193f6658fe9c9eac9455657df4e84 /scene/gui | |
parent | 5f49e0c7efa13ada96f5150a690d884b1f68c50f (diff) | |
parent | 9f73abfa9f927ed6109b46991517f824b2ba318e (diff) |
Merge pull request #47486 from bruvzg/rtl_effects
RichTextLabel: On custom effect change, parse bbcode only if it's enabled and not empty.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 6ad66e4385..09f6578295 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3756,7 +3756,9 @@ void RichTextLabel::set_effects(const Vector<Variant> &effects) { custom_effects.push_back(effect); } - parse_bbcode(bbcode); + if ((bbcode != "") && use_bbcode) { + parse_bbcode(bbcode); + } } Vector<Variant> RichTextLabel::get_effects() { @@ -3773,7 +3775,9 @@ void RichTextLabel::install_effect(const Variant effect) { if (rteffect.is_valid()) { custom_effects.push_back(effect); - parse_bbcode(bbcode); + if ((bbcode != "") && use_bbcode) { + parse_bbcode(bbcode); + } } } |