Commit df9e9e26 authored by Michael Natterer's avatar Michael Natterer 😴

Disable layer masks on group layers for the time being

Will enable it again when I fixed it properly, it's clearly a
non-trivial problem that needs some thinking. Disabled for now because
it causes crashes.
parent 871e41c0
......@@ -615,7 +615,7 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-lock-alpha", can_lock_alpha);
SET_ACTIVE ("layers-lock-alpha", lock_alpha);
SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask);
SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask && !children);
SET_SENSITIVE ("layers-mask-apply", writable && !fs && !ac && mask && !children);
SET_SENSITIVE ("layers-mask-delete", layer && !fs && !ac && mask);
......
......@@ -1548,7 +1548,8 @@ image_add_layer_mask_invoker (GimpProcedure *procedure,
if (success)
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask), image, error))
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask), image, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......
......@@ -618,7 +618,8 @@ layer_add_mask_invoker (GimpProcedure *procedure,
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
gimp_item_get_image (GIMP_ITEM (layer)),
error))
error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......
......@@ -1077,7 +1077,8 @@ sub image_add_layer_mask {
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask), image, error))
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask), image, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......
......@@ -277,7 +277,8 @@ HELP
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
gimp_item_get_image (GIMP_ITEM (layer)),
error))
error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......
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