Commit 45fc30ca authored by Ell's avatar Ell

Issue #2473 - Transforming a layer doesn't properly transform its mask

In gimp_drawable_transform_buffer_affine(), avoid modifying the
clipping mode when transforming layer masks, since this function is
used (among other things) to transform layer masks together with
their layer, in which case they should use the same clipping mode
as the layer.

This fixes a regression introduced by commit
2ae823ba, causing layer masks to be
transformed with a mismatched clipping mode during layer
transforms, leading to discrepencies between the transformed layer
and the transformed mask.

This commit merely reverts the necessary part of above commit,
fixing the regression, though note that this code is really up for
some serious refactoring: the logic for determining which clipping
mode to use when is spread all over the place.
parent 658d9f3a
......@@ -144,9 +144,16 @@ gimp_drawable_transform_buffer_affine (GimpDrawable *drawable,
u2 = u1 + gegl_buffer_get_width (orig_buffer);
v2 = v1 + gegl_buffer_get_height (orig_buffer);
clip_result = gimp_drawable_transform_get_effective_clip (drawable,
/* Don't modify the clipping mode of layer masks here, so that,
* when transformed together with their layer, they match the
* layer's clipping mode.
clip_result = gimp_drawable_transform_get_effective_clip (drawable,
/* Find the bounding coordinates of target */
gimp_transform_resize_boundary (&m, clip_result,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment