pdb: fix gimp_layer_new_from_drawable() PDB wrapper

We must always call gimp_item_convert() even if the source drawable is
in the same image, or we might end up with a layer of wrong pixel
format. This was probably broken for years.
This commit is contained in:
Michael Natterer 2013-11-19 21:39:13 +01:00
parent fd8bddae22
commit 29d95f4c39
2 changed files with 2 additions and 8 deletions

View File

@ -208,9 +208,6 @@ layer_new_from_drawable_invoker (GimpProcedure *procedure,
else else
new_type = GIMP_TYPE_LAYER; new_type = GIMP_TYPE_LAYER;
if (dest_image == gimp_item_get_image (GIMP_ITEM (drawable)))
new_item = gimp_item_duplicate (GIMP_ITEM (drawable), new_type);
else
new_item = gimp_item_convert (GIMP_ITEM (drawable), dest_image, new_type); new_item = gimp_item_convert (GIMP_ITEM (drawable), dest_image, new_type);
if (new_item) if (new_item)

View File

@ -190,9 +190,6 @@ HELP
else else
new_type = GIMP_TYPE_LAYER; new_type = GIMP_TYPE_LAYER;
if (dest_image == gimp_item_get_image (GIMP_ITEM (drawable)))
new_item = gimp_item_duplicate (GIMP_ITEM (drawable), new_type);
else
new_item = gimp_item_convert (GIMP_ITEM (drawable), dest_image, new_type); new_item = gimp_item_convert (GIMP_ITEM (drawable), dest_image, new_type);
if (new_item) if (new_item)