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:
parent
b2e70c5b89
commit
8a0754a5be
2 changed files with 11 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue