plug-ins: properly "Apply layer masks before saving" when checked.

The `if` test was inverted. When the option is checked, we don't want to
add the GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS capability so that
gimp_export_image() applies the mask.
This is a first step to fix bug 783528, but it's not finished. Right
now, when the option is unchecked, the mask is simply ignored. We want
to export a PDF mask instead.
This commit is contained in:
Jehan 2017-06-15 20:53:55 +02:00
parent d37fb8aa5c
commit 0bd94f172a
1 changed files with 4 additions and 1 deletions

View File

@ -488,7 +488,10 @@ run (const gchar *name,
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_LAYERS |
GIMP_EXPORT_CAN_HANDLE_INDEXED);
if (optimize.apply_masks)
/* This seems counter-intuitive, but not setting the mask capability
* will apply any layer mask upon gimp_export_image().
*/
if (! optimize.apply_masks)
capabilities |= GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS;
for (i = 0; i < multi_page.image_count; i++)