From 4aec57d2b749a686004a9d8ce07ff9b05654591b Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 30 Jan 2026 18:37:32 +0100 Subject: [PATCH] app: install "trc" with G_PARAM_CONSTRUCT. If we don't install it as a CONSTRUCT property, nor are we setting it explicitly in the init() method, then it is never set (unless explicitly set!), which often means the compiler sets it to 0, i.e. GIMP_TRC_LINEAR for this enum type. This was one of the issues which was explaining why these 2 operations were always run in linear, even though the default was non-linear. Note though that this fix is not enough. Now I even see the opposite: it is always run in non-linear. I have more fixes in other parts of the operations coming up. --- app/operations/gimpoperationcurves.c | 3 ++- app/operations/gimpoperationlevels.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/operations/gimpoperationcurves.c b/app/operations/gimpoperationcurves.c index cfae2a10b8..e4572d67ce 100644 --- a/app/operations/gimpoperationcurves.c +++ b/app/operations/gimpoperationcurves.c @@ -77,7 +77,8 @@ gimp_operation_curves_class_init (GimpOperationCurvesClass *klass) "What TRC to operate on", GIMP_TYPE_TRC_TYPE, GIMP_TRC_NON_LINEAR, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, GIMP_OPERATION_POINT_FILTER_PROP_CONFIG, diff --git a/app/operations/gimpoperationlevels.c b/app/operations/gimpoperationlevels.c index da792e24b4..d462cdfeff 100644 --- a/app/operations/gimpoperationlevels.c +++ b/app/operations/gimpoperationlevels.c @@ -74,7 +74,8 @@ gimp_operation_levels_class_init (GimpOperationLevelsClass *klass) "What TRC to operate on", GIMP_TYPE_TRC_TYPE, GIMP_TRC_NON_LINEAR, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,