Issue #15121: link layer positioning problem.

Only store a PROP_TRANSFORM if there is a transform. Otherwise the
stored offsets are bogus and would only break the position at load.
This commit is contained in:
Jehan 2025-11-08 12:37:45 +01:00
parent b2e70c5b89
commit 8a0754a5be
2 changed files with 11 additions and 6 deletions

View file

@ -841,12 +841,16 @@ gimp_link_layer_get_transform (GimpLinkLayer *layer,
{
g_return_val_if_fail (GIMP_IS_LINK_LAYER (layer), FALSE);
*matrix = layer->p->matrix;
*offset_x = layer->p->offset_x;
*offset_y = layer->p->offset_y;
*interpolation = layer->p->interpolation;
if (matrix)
*matrix = layer->p->matrix;
if (offset_x)
*offset_x = layer->p->offset_x;
if (offset_y)
*offset_y = layer->p->offset_y;
if (interpolation)
*interpolation = layer->p->interpolation;
return ! gimp_matrix3_is_identity (matrix);
return ! gimp_matrix3_is_identity (&layer->p->matrix);
}
gboolean

View file

@ -745,7 +745,8 @@ xcf_save_layer_props (XcfInfo *info,
else if (GIMP_IS_LINK_LAYER (layer))
{
xcf_check_error (xcf_save_prop (info, image, PROP_LINK_LAYER, error, layer), ;);
xcf_check_error (xcf_save_prop (info, image, PROP_TRANSFORM, error, layer), ;);
if (gimp_link_layer_get_transform (GIMP_LINK_LAYER (layer), NULL, NULL, NULL, NULL))
xcf_check_error (xcf_save_prop (info, image, PROP_TRANSFORM, error, layer), ;);
}
if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))