Issue #11988: GEGL param specs are not serialized anymore.

This is a regression brought with commits 9b5463b5c5 and f7aaba9fc9.
Technically the bug already existed, but it was brought to light after
the reordering of our param bit flags, because GEGL_PARAM_PAD_INPUT
(which is set on all op properties) and GIMP_PARAM_DONT_SERIALIZE are
now the same value. It used to be same as GIMP_CONFIG_PARAM_AGGREGATE,
which, by chance only, didn't have unfortunate consequence on
serialization, yet that was also a bug. The real fix is that we should
not propagate GEGL bit flags in our operation config types.
This commit is contained in:
Jehan
2024-09-04 13:36:24 +02:00
parent 3a0fb282a4
commit d7fadf9fe6

View File

@ -151,6 +151,10 @@ gimp_operation_config_get_type (Gimp *gimp,
strcmp (pspec->name, "input") && strcmp (pspec->name, "input") &&
strcmp (pspec->name, "output")) strcmp (pspec->name, "output"))
{ {
GParamFlags flags;
flags = pspec->flags & ~(GEGL_PARAM_PAD_INPUT | GEGL_PARAM_PAD_OUTPUT);
if (GEGL_IS_PARAM_SPEC_COLOR (pspec)) if (GEGL_IS_PARAM_SPEC_COLOR (pspec))
{ {
/* As special exception, let's transform GeglParamColor /* As special exception, let's transform GeglParamColor
@ -165,7 +169,7 @@ gimp_operation_config_get_type (Gimp *gimp,
g_param_spec_get_blurb (pspec), g_param_spec_get_blurb (pspec),
TRUE, TRUE,
gegl_param_spec_color_get_default (pspec), gegl_param_spec_color_get_default (pspec),
pspec->flags); flags);
prop_keys = gegl_operation_list_property_keys (operation, pspec->name, &n_keys); prop_keys = gegl_operation_list_property_keys (operation, pspec->name, &n_keys);
for (gint k = 0; k < n_keys; k++) for (gint k = 0; k < n_keys; k++)
{ {
@ -179,9 +183,12 @@ gimp_operation_config_get_type (Gimp *gimp,
} }
else else
{ {
pspecs[j] = pspec; pspecs[j] = gimp_config_param_spec_duplicate (pspec);
if (pspecs[j])
pspecs[j]->flags = flags;
} }
if (pspecs[j])
j++; j++;
} }
} }