Commit 7e661d3c authored by Ell's avatar Ell
Browse files

pdb: allow adding masks to group layers in layer-add-mask

... and a small fix to last commit.
parent 9befb859
......@@ -736,8 +736,7 @@ layer_add_mask_invoker (GimpProcedure *procedure,
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
gimp_item_get_image (GIMP_ITEM (layer)),
error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......@@ -771,8 +770,8 @@ layer_remove_mask_invoker (GimpProcedure *procedure,
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, modify, error) &&
gimp_layer_get_mask (layer) &&
(! gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
mode == GIMP_MASK_DISCARD))
(mode == GIMP_MASK_DISCARD ||
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error)))
gimp_layer_apply_mask (layer, mode, TRUE);
else
success = FALSE;
......
......@@ -387,8 +387,7 @@ HELP
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
gimp_item_get_image (GIMP_ITEM (layer)),
error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
else
success = FALSE;
......@@ -424,8 +423,8 @@ HELP
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, modify, error) &&
gimp_layer_get_mask (layer) &&
(! gimp_viewable_get_children (GIMP_VIEWABLE (layer)) ||
mode == GIMP_MASK_DISCARD))
(mode == GIMP_MASK_DISCARD ||
gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error)))
gimp_layer_apply_mask (layer, mode, TRUE);
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