[3.x, RTL] Track external changes in the custom fonts set by BBCode / push_font.
This commit is contained in:
@ -164,7 +164,17 @@ private:
|
||||
|
||||
struct ItemFont : public Item {
|
||||
Ref<Font> font;
|
||||
ObjectID owner;
|
||||
|
||||
ItemFont() { type = ITEM_FONT; }
|
||||
~ItemFont() {
|
||||
if (font.is_valid()) {
|
||||
RichTextLabel *owner_rtl = ObjectDB::get_instance<RichTextLabel>(owner);
|
||||
if (owner_rtl) {
|
||||
font->disconnect("changed", owner_rtl, "_invalidate_fonts");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct ItemColor : public Item {
|
||||
@ -348,6 +358,8 @@ private:
|
||||
void _add_item(Item *p_item, bool p_enter = false, bool p_ensure_newline = false);
|
||||
void _remove_item(Item *p_item, const int p_line, const int p_subitem_line);
|
||||
|
||||
void _invalidate_fonts();
|
||||
|
||||
struct ProcessState {
|
||||
int line_width;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user