diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2021-08-13 16:32:11 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2021-08-13 17:47:53 +0100 |
commit | b6f5912174aaec1b18879b31ac1b2835c3e40f2b (patch) | |
tree | b3242754141713c9fa5b776f79a14a618734c77f /scene | |
parent | b73983340da174e1de95a49b59649f3a79438906 (diff) |
Move CodeEdit theme overrides into EditorTheme
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/code_edit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 503f9ffd4a..c7230a7208 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -2906,7 +2906,10 @@ void CodeEdit::_text_changed() { while (lc /= 10) { line_number_digits++; } - set_gutter_width(line_number_gutter, (line_number_digits + 1) * font->get_char_size('0', 0, font_size).width); + + if (font.is_valid()) { + set_gutter_width(line_number_gutter, (line_number_digits + 1) * font->get_char_size('0', 0, font_size).width); + } lc = get_line_count(); int line_change_size = (lines_edited_to - lines_edited_from); |