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.
This commit is contained in:
Jehan 2026-01-30 18:37:32 +01:00
parent a140c251cb
commit 4aec57d2b7
2 changed files with 4 additions and 2 deletions

View file

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

View file

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