tools: Fix crash in passthrough composited preview
Resolves #13087 We use gimp_layer_get_effective_mode () to retrieve a simplified layer mode for optimization purposes (e.g. if it's effectively NORMAL, we can do less processing). GimpTransformGridTool used this function when the user requests Composited Preview to only apply transforms to individual layers in a group if absolutely necessary. This means that sometimes, it returns NORMAL instead of PASS_THROUGH depending on the number and types of layers in the group. Since71aff497, when we remove a filter we also update the effective mode of the group layer. However, this leads to an infinite loop scenario where the effective mode change causes the TransformGridTool to repeatedly remove and add a filter until GIMP crashes. This patch changes the gimp_transform_grid_tool_add_filter () check to always get the actual mode rather than the effective mode. This prevents the effective mode change from causing an infinite loop, but does mean that we now always apply transforms to all layers of the group even if the composite preview would work fine. (cherry picked from commitede124ff85)
This commit is contained in:
parent
d57fb16c2d
commit
a20d8fa561
1 changed files with 1 additions and 4 deletions
|
|
@ -1909,10 +1909,7 @@ gimp_transform_grid_tool_add_filter (GimpDrawable *drawable,
|
|||
GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL;
|
||||
|
||||
if (GIMP_IS_LAYER (drawable))
|
||||
{
|
||||
gimp_layer_get_effective_mode (GIMP_LAYER (drawable),
|
||||
&mode, NULL, NULL, NULL);
|
||||
}
|
||||
mode = gimp_layer_get_mode (GIMP_LAYER (drawable));
|
||||
|
||||
if (mode != GIMP_LAYER_MODE_PASS_THROUGH)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue