Commit 72d7aaae authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

explicitly activate the drawable the floating selection was attached to

2004-01-22  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.c (floating_sel_anchor):
	explicitly activate the drawable the floating selection was
	attached to (function was relying on implicit voodoo that
	happened 1.2). Fixes bug #132162.
parent f3c91918
2004-01-22 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer-floating-sel.c (floating_sel_anchor):
explicitly activate the drawable the floating selection was
attached to (function was relying on implicit voodoo that
happened 1.2). Fixes bug #132162.
2004-01-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean use_default_values"
......@@ -105,7 +105,8 @@ floating_sel_remove (GimpLayer *layer)
void
floating_sel_anchor (GimpLayer *layer)
{
GimpImage *gimage;
GimpImage *gimage;
GimpDrawable *drawable;
if (! (gimage = gimp_item_get_image (GIMP_ITEM (layer))))
return;
......@@ -136,9 +137,27 @@ floating_sel_anchor (GimpLayer *layer)
GIMP_ITEM (layer)->width,
GIMP_ITEM (layer)->height, TRUE);
drawable = layer->fs.drawable;
/* remove the floating selection */
gimp_image_remove_layer (gimage, layer);
/* activate the drawable the floating selection was attached to */
if (GIMP_IS_LAYER_MASK (drawable))
{
GimpLayerMask *mask = GIMP_LAYER_MASK (drawable);
gimp_image_set_active_layer (gimage, gimp_layer_mask_get_layer (mask));
}
else if (GIMP_IS_CHANNEL (drawable))
{
gimp_image_set_active_channel (gimage, GIMP_CHANNEL (drawable));
}
else
{
gimp_image_set_active_layer (gimage, GIMP_LAYER (drawable));
}
/* end the group undo */
gimp_image_undo_group_end (gimage);
......
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