mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 03:52:33 +00:00
g_return_if_fail() on the mask's image being the same as the layer's
2008-10-06 Michael Natterer <mitch@gimp.org> * app/core/gimplayer.c (gimp_layer_add_mask): g_return_if_fail() on the mask's image being the same as the layer's image. The PDB already checks for this. * app/core/gimpimage.c (gimp_image_add_layer,channel,vectors): remove calls to gimp_item_set_image() because we only accept itmes of this image anyway. svn path=/trunk/; revision=27138
This commit is contained in:
parent
14aad7c222
commit
eed8f2c326
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-10-06 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimplayer.c (gimp_layer_add_mask): g_return_if_fail()
|
||||
on the mask's image being the same as the layer's image. The PDB
|
||||
already checks for this.
|
||||
|
||||
* app/core/gimpimage.c (gimp_image_add_layer,channel,vectors):
|
||||
remove calls to gimp_item_set_image() because we only accept
|
||||
itmes of this image anyway.
|
||||
|
||||
2008-10-05 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/plug-in/gimpplugin-cleanup.c
|
||||
|
|
|
@ -2875,11 +2875,6 @@ gimp_image_add_layer (GimpImage *image,
|
|||
gimp_image_undo_push_layer_add (image, _("Add Layer"),
|
||||
layer, active_layer);
|
||||
|
||||
gimp_item_set_image (GIMP_ITEM (layer), image);
|
||||
|
||||
if (layer->mask)
|
||||
gimp_item_set_image (GIMP_ITEM (layer->mask), image);
|
||||
|
||||
/* If the layer is a floating selection, set the ID */
|
||||
if (gimp_layer_is_floating_sel (layer))
|
||||
image->floating_sel = layer;
|
||||
|
@ -3214,8 +3209,6 @@ gimp_image_add_channel (GimpImage *image,
|
|||
gimp_image_undo_push_channel_add (image, _("Add Channel"),
|
||||
channel, active_channel);
|
||||
|
||||
gimp_item_set_image (GIMP_ITEM (channel), image);
|
||||
|
||||
/* add the layer to the list at the specified position */
|
||||
if (position == -1)
|
||||
{
|
||||
|
@ -3439,8 +3432,6 @@ gimp_image_add_vectors (GimpImage *image,
|
|||
gimp_image_undo_push_vectors_add (image, _("Add Path"),
|
||||
vectors, active_vectors);
|
||||
|
||||
gimp_item_set_image (GIMP_ITEM (vectors), image);
|
||||
|
||||
/* add the layer to the list at the specified position */
|
||||
if (position == -1)
|
||||
{
|
||||
|
|
|
@ -1250,6 +1250,8 @@ gimp_layer_add_mask (GimpLayer *layer,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
|
||||
g_return_val_if_fail (gimp_item_get_image (GIMP_ITEM (layer)) ==
|
||||
gimp_item_get_image (GIMP_ITEM (mask)), NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
if (! gimp_item_is_attached (GIMP_ITEM (layer)))
|
||||
|
|
Loading…
Reference in a new issue