mirror of https://github.com/GNOME/gimp.git
app: honor precision when copying drawables between images
This commit is contained in:
parent
5167550271
commit
0e8a00db8b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue