mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
FontEditor: Reset selected glyph on init
Fixes glyphs not updating when loading between fonts at the same index. Fixes GlyphEditor spinbox inadvertently modifying width of last selected index.
This commit is contained in:
parent
57c6264877
commit
ebf3ce7806
2 changed files with 5 additions and 3 deletions
|
@ -253,15 +253,14 @@ void FontEditorWidget::initialize(const String& path, RefPtr<Gfx::BitmapFont>&&
|
|||
m_path = path;
|
||||
m_edited_font = edited_font;
|
||||
|
||||
m_glyph_map_widget->initialize(*m_edited_font);
|
||||
m_glyph_editor_widget->initialize(*m_edited_font);
|
||||
|
||||
m_glyph_editor_container->set_fixed_size(m_glyph_editor_widget->preferred_width(), m_glyph_editor_widget->preferred_height());
|
||||
m_left_column_container->set_fixed_width(m_glyph_editor_widget->preferred_width());
|
||||
m_glyph_editor_width_spinbox->set_enabled(!m_edited_font->is_fixed_width());
|
||||
m_glyph_editor_width_spinbox->set_max(m_edited_font->max_glyph_width());
|
||||
|
||||
m_glyph_map_widget->initialize(*m_edited_font);
|
||||
m_glyph_map_widget->set_selected_glyph('A');
|
||||
|
||||
m_name_textbox->set_text(m_edited_font->name());
|
||||
m_family_textbox->set_text(m_edited_font->family());
|
||||
|
||||
|
@ -273,6 +272,8 @@ void FontEditorWidget::initialize(const String& path, RefPtr<Gfx::BitmapFont>&&
|
|||
|
||||
m_fixed_width_checkbox->set_checked(m_edited_font->is_fixed_width());
|
||||
|
||||
m_glyph_map_widget->set_selected_glyph('A');
|
||||
|
||||
if (on_initialize)
|
||||
on_initialize();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue