Resolves #16102
The active selection can impact the other NDE filters
when exporting, resulting in empty spaces displayed when
the filter is outside the area of that selection.

Similar to what we do with XCF saving, we temporarily save
and clear the selection in the duplicated image. Then we
merge the filters and restore the active selection.
This commit is contained in:
Alx Sa 2026-03-28 05:09:31 +00:00
parent e0e4285b73
commit 43c57af5d7

View file

@ -863,11 +863,17 @@ gimp_export_options_get_image (GimpExportOptions *options,
GSList *list;
GList *drawables_in;
GList *drawables_out;
GimpChannel *selection_copy;
*image = gimp_image_duplicate (*image);
drawables_in = gimp_image_list_selected_layers (*image);
drawables_out = drawables_in;
/* Temporarily remove selection so that any merged filters
* aren't affected by it */
selection_copy = GIMP_CHANNEL (gimp_selection_save (*image));
gimp_selection_none (*image);
gimp_image_undo_disable (*image);
for (list = actions; list; list = list->next)
@ -882,6 +888,10 @@ gimp_export_options_get_image (GimpExportOptions *options,
}
g_list_free (drawables_out);
gimp_image_select_item (*image, GIMP_CHANNEL_OP_REPLACE,
GIMP_ITEM (selection_copy));
gimp_image_remove_channel (*image, selection_copy);
}
g_slist_free (actions);