Issue #5179: fix "Add layer masks" and improve "Edit layer mask".

The `mask` test was broken as it is not multi-layer aware (also it
should be negated).

The "layers-mask-edit" test was actually already fine because current
implementation only allow mask editing when single-selected. Still
improve the test to use multi-layer variables.

Thanks to Cyril Richard for the original patch proposition from which I
derivated the present one.
This commit is contained in:
Jehan 2020-06-09 11:54:16 +02:00
parent 5302beb947
commit 080ef8a0d8
1 changed files with 2 additions and 2 deletions

View File

@ -1076,14 +1076,14 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-composite-mode-clip-to-layer", n_layers && cm_mutable); SET_SENSITIVE ("layers-composite-mode-clip-to-layer", n_layers && cm_mutable);
SET_SENSITIVE ("layers-composite-mode-intersection", n_layers && cm_mutable); SET_SENSITIVE ("layers-composite-mode-intersection", n_layers && cm_mutable);
SET_SENSITIVE ("layers-mask-add", n_layers > 0 && !fs && !ac && mask); SET_SENSITIVE ("layers-mask-add", n_layers > 0 && !fs && !ac && have_no_masks);
SET_SENSITIVE ("layers-mask-add-button", n_layers > 0 && !fs && !ac); SET_SENSITIVE ("layers-mask-add-button", n_layers > 0 && !fs && !ac);
SET_SENSITIVE ("layers-mask-add-last-values", n_layers > 0 && !fs && !ac && have_no_masks); SET_SENSITIVE ("layers-mask-add-last-values", n_layers > 0 && !fs && !ac && have_no_masks);
SET_SENSITIVE ("layers-mask-apply", have_writable && !fs && !ac && have_masks && have_no_groups); SET_SENSITIVE ("layers-mask-apply", have_writable && !fs && !ac && have_masks && have_no_groups);
SET_SENSITIVE ("layers-mask-delete", n_layers > 0 && !fs && !ac && have_masks); SET_SENSITIVE ("layers-mask-delete", n_layers > 0 && !fs && !ac && have_masks);
SET_SENSITIVE ("layers-mask-edit", layer && !fs && !ac && mask); SET_SENSITIVE ("layers-mask-edit", n_layers == 1 && !fs && !ac && have_masks);
SET_SENSITIVE ("layers-mask-show", n_layers > 0 && !fs && !ac && have_masks); SET_SENSITIVE ("layers-mask-show", n_layers > 0 && !fs && !ac && have_masks);
SET_SENSITIVE ("layers-mask-disable", n_layers > 0 && !fs && !ac && have_masks); SET_SENSITIVE ("layers-mask-disable", n_layers > 0 && !fs && !ac && have_masks);