瀏覽代碼

LibGUI: Reset GlyphMapWidget scroll value when changing active range

Fixes being teleported to the old location when scrolling on a
previously browsed range.
thankyouverycool 2 年之前
父節點
當前提交
02212f373b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Libraries/LibGUI/GlyphMapWidget.cpp

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

@@ -515,6 +515,7 @@ void GlyphMapWidget::set_active_range(Unicode::CodePointRange range)
     m_active_range = range;
     m_glyph_count = range.last - range.first + 1;
     set_active_glyph(range.first);
+    vertical_scrollbar().set_value(0);
     recalculate_content_size();
     update();
 }