1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

CharacterMap+FontEditor: Switch current Unicode block on arrow press

This commit is contained in:
Karol Kosek 2022-02-26 13:33:32 +01:00 committed by Tim Flynn
parent 17f9d3d45e
commit cef595aa5c
2 changed files with 4 additions and 2 deletions

View file

@ -454,7 +454,8 @@ FontEditorWidget::FontEditorWidget()
m_filter_model = MUST(GUI::FilteringProxyModel::create(*m_unicode_block_model));
m_filter_model->set_filter_term("");
m_unicode_block_listview->on_activation = [this, unicode_blocks](auto& index) {
m_unicode_block_listview->on_selection_change = [this, unicode_blocks] {
auto index = m_unicode_block_listview->selection().first();
auto mapped_index = m_filter_model->map(index);
if (mapped_index.row() > 0)
m_range = unicode_blocks[mapped_index.row() - 1].code_point_range;