]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix "official" preset reload
authorJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 14 Jan 2018 20:10:02 +0000 (13:10 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 14 Jan 2018 20:11:02 +0000 (13:11 -0700)
The preset type was overwritten with custom type causing a failure to
look up the preset when reloading.

gtk/src/presets.c

index 06a29dd0556907b9c99db7d435273926d995053e..feceb3e54e956106547f95afd8a2e17ffdcbc1a6 100644 (file)
@@ -1637,7 +1637,6 @@ ghb_settings_to_preset(GhbValue *settings)
 
     ghb_dict_remove(preset, "title");
     ghb_dict_set_bool(preset, "Default", 0);
-    ghb_dict_set_int(preset, "Type", HB_PRESET_TYPE_CUSTOM);
     if (!ghb_dict_get_bool(preset, "PictureWidthEnable"))
     {
         ghb_dict_remove(preset, "PictureWidth");
@@ -1874,6 +1873,7 @@ settings_save(signal_user_data_t *ud, const char * category,
     }
 
     new_preset = ghb_settings_to_preset(ud->settings);
+    ghb_dict_set_int(new_preset, "Type", HB_PRESET_TYPE_CUSTOM);
     ghb_dict_set_string(new_preset, "PresetName", name);
     ghb_dict_set_string(new_preset, "PresetDescription", desc);