gimp r27138 - in trunk: . app/core
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27138 - in trunk: . app/core
- Date: Mon, 6 Oct 2008 09:26:44 +0000 (UTC)
Author: mitch
Date: Mon Oct 6 09:26:44 2008
New Revision: 27138
URL: http://svn.gnome.org/viewvc/gimp?rev=27138&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/core/gimpimage.c
trunk/app/core/gimplayer.c
Modified: trunk/app/core/gimpimage.c
==============================================================================
--- trunk/app/core/gimpimage.c (original)
+++ trunk/app/core/gimpimage.c Mon Oct 6 09:26:44 2008
@@ -2875,11 +2875,6 @@
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_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_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)
{
Modified: trunk/app/core/gimplayer.c
==============================================================================
--- trunk/app/core/gimplayer.c (original)
+++ trunk/app/core/gimplayer.c Mon Oct 6 09:26:44 2008
@@ -1250,6 +1250,8 @@
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)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]