fixed a bug introduced by myself on 2001-12-13: the floating selection

2002-08-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-mask.c (gimp_image_mask_float): fixed a bug
	introduced by myself on 2001-12-13: the floating selection layer
	needs to be of the type of it's associated drawable, which may be
	different from the image's type if it is a channel or layer mask
	(fixes #91814).
This commit is contained in:
Michael Natterer 2002-08-27 20:06:40 +00:00 committed by Michael Natterer
parent e3e2b6de89
commit 4dc1b80eb2
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2002-08-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.c (gimp_image_mask_float): fixed a bug
introduced by myself on 2001-12-13: the floating selection layer
needs to be of the type of it's associated drawable, which may be
different from the image's type if it is a channel or layer mask
(fixes #91814).
2002-08-27 Manish Singh <yosh@gimp.org>
* devel-docs/lib*/Makefile.am: add dummy all-local rules for the

View File

@ -380,10 +380,13 @@ gimp_image_mask_float (GimpImage *gimage,
/* Cut the selected region */
tiles = gimp_image_mask_extract (gimage, drawable, TRUE, FALSE, TRUE);
/* Create a new layer from the buffer */
/* Create a new layer from the buffer, using the drawable's type
* because it may be different from the image's type if we cut from
* a channel or layer mask
*/
layer = gimp_layer_new_from_tiles (tiles,
gimage,
gimp_image_base_type_with_alpha (gimage),
gimp_drawable_type_with_alpha (drawable),
_("Floating Selection"),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);