diff --git a/app/pdb/file-cmds.c b/app/pdb/file-cmds.c index aef4cda9e3..145c0b9dc4 100644 --- a/app/pdb/file-cmds.c +++ b/app/pdb/file-cmds.c @@ -84,8 +84,17 @@ file_load_invoker (GimpProcedure *procedure, gimp_value_array_index (new_args, 1)); for (i = 2; i < proc->num_args; i++) - if (G_IS_PARAM_SPEC_STRING (proc->args[i])) - g_value_set_static_string (gimp_value_array_index (new_args, i), ""); + if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i])) + { + GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]); + + g_value_set_static_string (gimp_value_array_index (new_args, i), + string_spec->default_value); + } + else if (G_IS_PARAM_SPEC_STRING (proc->args[i])) + { + g_value_set_static_string (gimp_value_array_index (new_args, i), ""); + } return_vals = gimp_pdb_execute_procedure_by_name_args (gimp->pdb, diff --git a/pdb/groups/file.pdb b/pdb/groups/file.pdb index 01254c4fd6..6974f4b4b4 100644 --- a/pdb/groups/file.pdb +++ b/pdb/groups/file.pdb @@ -76,8 +76,17 @@ HELP gimp_value_array_index (new_args, 1)); for (i = 2; i < proc->num_args; i++) - if (G_IS_PARAM_SPEC_STRING (proc->args[i])) - g_value_set_static_string (gimp_value_array_index (new_args, i), ""); + if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i])) + { + GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]); + + g_value_set_static_string (gimp_value_array_index (new_args, i), + string_spec->default_value); + } + else if (G_IS_PARAM_SPEC_STRING (proc->args[i])) + { + g_value_set_static_string (gimp_value_array_index (new_args, i), ""); + } return_vals = gimp_pdb_execute_procedure_by_name_args (gimp->pdb,