mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 17:59:37 +00:00
libgimp: Convert floating selection to layer on export
On export, when GIMP_EXPORT_CAN_HANDLE_LAYERS is not set but GIMP_EXPORT_NEEDS_ALPHA is, we merge all layers in the image. If there's a floating selection however, its attached layer is not included in the exported image. This patch converts the floating selection to a regular layer so that both are included in the final export.
This commit is contained in:
parent
3d6a27570f
commit
8d53675d9f
1 changed files with 9 additions and 3 deletions
|
@ -50,9 +50,15 @@ static void
|
||||||
export_merge (GimpImage *image,
|
export_merge (GimpImage *image,
|
||||||
GList **drawables)
|
GList **drawables)
|
||||||
{
|
{
|
||||||
GList *layers;
|
GList *layers;
|
||||||
GList *iter;
|
GList *iter;
|
||||||
gint32 nvisible = 0;
|
GimpLayer *floating_sel;
|
||||||
|
gint32 nvisible = 0;
|
||||||
|
|
||||||
|
/* Convert floating selection to layer if it exists */
|
||||||
|
floating_sel = gimp_image_get_floating_sel (image);
|
||||||
|
if (floating_sel)
|
||||||
|
gimp_floating_sel_to_layer (floating_sel);
|
||||||
|
|
||||||
layers = gimp_image_list_layers (image);
|
layers = gimp_image_list_layers (image);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue