Merge pull request #74547 from YuriSizov/theme-wait-you-dropped-font-size

Add missing handler for removing font sizes in Themes
This commit is contained in:
Rémi Verschelde 2023-03-08 08:57:24 +01:00
commit 540c8eb095
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2952,6 +2952,10 @@ void ThemeTypeEditor::_item_remove_cbk(int p_data_type, String p_item_name) {
ur->add_undo_method(*edited_theme, "set_font", p_item_name, edited_type, Ref<Font>());
}
} break;
case Theme::DATA_TYPE_FONT_SIZE: {
ur->add_do_method(*edited_theme, "clear_font_size", p_item_name, edited_type);
ur->add_undo_method(*edited_theme, "set_font_size", p_item_name, edited_type, edited_theme->get_font_size(p_item_name, edited_type));
} break;
case Theme::DATA_TYPE_ICON: {
ur->add_do_method(*edited_theme, "clear_icon", p_item_name, edited_type);
if (edited_theme->has_icon(p_item_name, edited_type)) {