do not set the "layers-mask-add" action insensitive if there's no alpha

2004-10-28  Sven Neumann  <sven@gimp.org>

	* app/actions/layers-actions.c (layers_actions_update): do not set
	the "layers-mask-add" action insensitive if there's no alpha channel.

	* app/actions/layers-commands.c (layers_add_mask_response): add an
	alpha channel if there isn't one already. Fixes bug #156676.
This commit is contained in:
Sven Neumann 2004-10-28 10:53:44 +00:00 committed by Sven Neumann
parent 6b2243f12d
commit 279d901051
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2004-10-28 Sven Neumann <sven@gimp.org>
* app/actions/layers-actions.c (layers_actions_update): do not set
the "layers-mask-add" action insensitive if there's no alpha channel.
* app/actions/layers-commands.c (layers_add_mask_response): add an
alpha channel if there isn't one already. Fixes bug #156676.
2004-10-28 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-interface.c (script_fu_interface):

View file

@ -472,7 +472,7 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-preserve-transparency", layer);
SET_ACTIVE ("layers-preserve-transparency", preserve);
SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask && alpha);
SET_SENSITIVE ("layers-mask-add", layer && !fs && !ac && !mask);
SET_SENSITIVE ("layers-mask-apply", layer && !fs && !ac && mask);
SET_SENSITIVE ("layers-mask-delete", layer && !fs && !ac && mask);

View file

@ -903,6 +903,9 @@ layers_add_mask_response (GtkWidget *widget,
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_ADD_MASK,
_("Add Layer Mask"));
if (! gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
gimp_layer_add_alpha (layer);
mask = gimp_layer_create_mask (layer, layer_add_mask_type);
if (layer_mask_invert)