1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

pdb: Set choice args to default in gimp-file-load

This patch resolves the same issue as 8021b464,
but for `gimp-file-load`.
This commit is contained in:
Alx Sa
2025-09-26 23:57:51 +00:00
parent 24c8f86c85
commit 714e9041d8
2 changed files with 22 additions and 4 deletions

View File

@@ -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,