From d7fadf9fe6300d18b74464d39a71419d445102d6 Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 4 Sep 2024 13:36:24 +0200 Subject: [PATCH] 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. --- app/operations/gimp-operation-config.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/operations/gimp-operation-config.c b/app/operations/gimp-operation-config.c index ec850cf166..9add601a3e 100644 --- a/app/operations/gimp-operation-config.c +++ b/app/operations/gimp-operation-config.c @@ -151,6 +151,10 @@ gimp_operation_config_get_type (Gimp *gimp, strcmp (pspec->name, "input") && strcmp (pspec->name, "output")) { + GParamFlags flags; + + flags = pspec->flags & ~(GEGL_PARAM_PAD_INPUT | GEGL_PARAM_PAD_OUTPUT); + if (GEGL_IS_PARAM_SPEC_COLOR (pspec)) { /* As special exception, let's transform GeglParamColor @@ -165,7 +169,7 @@ gimp_operation_config_get_type (Gimp *gimp, g_param_spec_get_blurb (pspec), TRUE, gegl_param_spec_color_get_default (pspec), - pspec->flags); + flags); prop_keys = gegl_operation_list_property_keys (operation, pspec->name, &n_keys); for (gint k = 0; k < n_keys; k++) { @@ -179,10 +183,13 @@ gimp_operation_config_get_type (Gimp *gimp, } else { - pspecs[j] = pspec; + pspecs[j] = gimp_config_param_spec_duplicate (pspec); + if (pspecs[j]) + pspecs[j]->flags = flags; } - j++; + if (pspecs[j]) + j++; } }