mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 09:29:38 +01:00
Cache text property when toggling BBCode
This commit is contained in:
parent
38bb088c1e
commit
147640412a
@ -2738,8 +2738,17 @@ void RichTextLabel::set_use_bbcode(bool p_enable) {
|
||||
if (use_bbcode == p_enable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_enable) {
|
||||
cached_text = get_text();
|
||||
}
|
||||
|
||||
use_bbcode = p_enable;
|
||||
set_bbcode(bbcode);
|
||||
|
||||
if (!p_enable) {
|
||||
set_text(cached_text);
|
||||
}
|
||||
property_list_changed_notify();
|
||||
}
|
||||
|
||||
|
@ -410,6 +410,7 @@ private:
|
||||
|
||||
bool use_bbcode;
|
||||
String bbcode;
|
||||
String cached_text;
|
||||
|
||||
int fixed_width;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user