diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 8b4c5d199..dd8c9cae0 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -114,7 +114,12 @@ static int _find_first_non_whitespace_column_of_line(const String &line) { } void TextEdit::Text::set_font(const Ref &p_font) { + if (font == p_font) { + return; + } + font = p_font; + clear_width_cache(); } void TextEdit::Text::set_indent_size(int p_indent_size) {