Browse Source

LibGUI: Preserve glyph selection when changing font

Sam Atkins 3 years ago
parent
commit
1d79e8cb0f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibGUI/GlyphMapWidget.cpp

+ 1 - 1
Userland/Libraries/LibGUI/GlyphMapWidget.cpp

@@ -52,6 +52,7 @@ GlyphMapWidget::GlyphMapWidget()
     set_focus_policy(FocusPolicy::StrongFocus);
     horizontal_scrollbar().set_visible(false);
     did_change_font();
+    set_active_glyph('A');
 }
 
 GlyphMapWidget::~GlyphMapWidget()
@@ -236,7 +237,6 @@ void GlyphMapWidget::did_change_font()
 {
     recalculate_content_size();
     vertical_scrollbar().set_step(font().glyph_height() + m_vertical_spacing);
-    set_active_glyph('A');
 }
 
 void GlyphMapWidget::scroll_to_glyph(int glyph)