mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
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.
This commit is contained in:
parent
ca062d83db
commit
298a6b9937
3 changed files with 5 additions and 5 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue