From 9f73abfa9f927ed6109b46991517f824b2ba318e Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:20:39 +0300 Subject: RichTextLabel: On custom effect change, parse bbcode only if it's enabled and not empty. --- scene/gui/rich_text_label.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scene') 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 &effects) { custom_effects.push_back(effect); } - parse_bbcode(bbcode); + if ((bbcode != "") && use_bbcode) { + parse_bbcode(bbcode); + } } Vector 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); + } } } -- cgit v1.2.3