Commit 0e8a00db authored by Michael Natterer's avatar Michael Natterer 😴

app: honor precision when copying drawables between images

parent 51675502
......@@ -1159,7 +1159,10 @@ gimp_drawable_convert_type (GimpDrawable *drawable,
{
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (GIMP_IS_IMAGE (dest_image));
g_return_if_fail (new_base_type != gimp_drawable_get_base_type (drawable));
g_return_if_fail (new_base_type !=
gimp_drawable_get_base_type (drawable) ||
gimp_image_get_precision (dest_image) !=
gimp_drawable_get_precision (drawable));
if (! gimp_item_is_attached (GIMP_ITEM (drawable)))
push_undo = FALSE;
......
......@@ -609,11 +609,17 @@ gimp_layer_convert (GimpItem *item,
GimpDrawable *drawable = GIMP_DRAWABLE (item);
GimpImageBaseType old_base_type;
GimpImageBaseType new_base_type;
GimpPrecision old_precision;
GimpPrecision new_precision;
old_base_type = gimp_drawable_get_base_type (drawable);
new_base_type = gimp_image_base_type (dest_image);
if (old_base_type != new_base_type)
old_precision = gimp_drawable_get_precision (drawable);
new_precision = gimp_image_get_precision (dest_image);
if (old_base_type != new_base_type ||
old_precision != new_precision)
gimp_drawable_convert_type (drawable, dest_image, new_base_type, FALSE);
if (layer->mask)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment