FontEditor: Let GlyphEditorWidget initialize a null BitmapFont

And remove public reference getters as there is no guarantee they are
nonnull.
This commit is contained in:
thankyouverycool 2023-05-10 17:01:12 -04:00 committed by Andreas Kling
commit 24046f9adf
Notes: sideshowbarker 2024-07-16 20:39:14 +09:00
3 changed files with 23 additions and 25 deletions

View file

@ -653,7 +653,7 @@ ErrorOr<void> MainWidget::initialize(StringView path, RefPtr<Gfx::BitmapFont>&&
if (m_preview_label)
m_preview_label->set_font(*m_font);
m_glyph_editor_widget->set_font(*m_font);
m_glyph_editor_widget->initialize(m_font);
m_glyph_editor_widget->set_fixed_size(m_glyph_editor_widget->preferred_width(), m_glyph_editor_widget->preferred_height());
m_glyph_editor_widget->set_glyph(active_glyph);