diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2021-11-29 14:43:02 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-30 10:51:51 +0100 |
commit | 298a6b99378e6cdbb80c5623582e510063da3d3f (patch) | |
tree | bbaa7cd1ca8893537ff6fc469557f68518b13122 /Userland/Applications/FontEditor | |
parent | ca062d83dbe0342aacc7d30924a63369819438c9 (diff) | |
download | serenity-298a6b99378e6cdbb80c5623582e510063da3d3f.zip |
LibGUI+FontEditor: Allow ComboBox on_change callback to be toggled
When calling set_selected_index() on ComboBox, allow its on_change
callback to be disabled. Fixes FontEditor window state erroneously
switching to modified when initializing between different slopes
and weights.
Diffstat (limited to 'Userland/Applications/FontEditor')
-rw-r--r-- | Userland/Applications/FontEditor/FontEditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/FontEditor/FontEditor.cpp b/Userland/Applications/FontEditor/FontEditor.cpp index 9f56711510..1431df911d 100644 --- a/Userland/Applications/FontEditor/FontEditor.cpp +++ b/Userland/Applications/FontEditor/FontEditor.cpp @@ -521,7 +521,7 @@ void FontEditorWidget::initialize(String const& path, RefPtr<Gfx::BitmapFont>&& int i = 0; for (auto& it : Gfx::font_weight_names) { if (it.style == m_edited_font->weight()) { - m_weight_combobox->set_selected_index(i); + m_weight_combobox->set_selected_index(i, GUI::AllowCallback::No); break; } i++; @@ -529,7 +529,7 @@ void FontEditorWidget::initialize(String const& path, RefPtr<Gfx::BitmapFont>&& i = 0; for (auto& it : Gfx::font_slope_names) { if (it.style == m_edited_font->slope()) { - m_slope_combobox->set_selected_index(i); + m_slope_combobox->set_selected_index(i, GUI::AllowCallback::No); break; } i++; |