Fixed TextEdit width calculation after it's font changes. This fixes lines being too long to scroll to in the editor.

This commit is contained in:
Relintai 2024-01-12 12:43:39 +01:00
parent 8d67178204
commit 1d8e1f7065

View File

@ -114,7 +114,12 @@ static int _find_first_non_whitespace_column_of_line(const String &line) {
}
void TextEdit::Text::set_font(const Ref<Font> &p_font) {
if (font == p_font) {
return;
}
font = p_font;
clear_width_cache();
}
void TextEdit::Text::set_indent_size(int p_indent_size) {