app: fix compositing of non-LEGACY layers in "show mask" mode

gimp_layer_update_mode_node(): when showing the mask, set mode to
NORMAL, and make sure that the composite space is PERCEPTUAL for
LEGACY layers, and LINEAR (or whatever is chosen in layer attibutes)
otherwise.
This commit is contained in:
Michael Natterer 2017-08-20 13:20:11 +02:00
parent 730573375d
commit b89d10a830
1 changed files with 10 additions and 2 deletions

View File

@ -661,10 +661,18 @@ gimp_layer_update_mode_node (GimpLayer *layer)
if (layer->mask && layer->show_mask)
{
visible_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
visible_mode = GIMP_LAYER_MODE_NORMAL;
visible_blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_space = layer->composite_space;
visible_composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
/* This makes sure that masks of LEGACY-mode layers are
* composited in PERCEPTUAL space, and non-LEGACY layers in
* LINEAR space, or whatever composite space was chosen in the
* layer attributes dialog
*/
if (visible_composite_space == GIMP_LAYER_COLOR_SPACE_AUTO)
visible_composite_space = gimp_layer_mode_get_composite_space (layer->mode);
}
else
{