[gimp] app: don't gimp_object_set_name() on an item that's attached to an image
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't gimp_object_set_name() on an item that's attached to an image
- Date: Sun, 6 Feb 2011 22:57:31 +0000 (UTC)
commit ef28d7fee66b0b5d66c175c45bf17980ff4ba757
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 6 23:56:24 2011 +0100
app: don't gimp_object_set_name() on an item that's attached to an image
because it bypasses the unique name logic used by gimp_item_rename().
app/core/gimpimage-merge.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c
index 6767df7..027dcea 100644
--- a/app/core/gimpimage-merge.c
+++ b/app/core/gimpimage-merge.c
@@ -661,6 +661,9 @@ gimp_image_merge_layers (GimpImage *image,
g_slist_free (reverse_list);
+ gimp_object_take_name (GIMP_OBJECT (merge_layer), name);
+ gimp_item_set_visible (GIMP_ITEM (merge_layer), TRUE, FALSE);
+
/* if the type is flatten, remove all the remaining layers */
if (merge_type == GIMP_FLATTEN_IMAGE)
{
@@ -686,13 +689,6 @@ gimp_image_merge_layers (GimpImage *image,
TRUE);
}
- /* set the name after the original layers have been removed so we
- * don't end up with #2 appended to the name
- */
- gimp_object_take_name (GIMP_OBJECT (merge_layer), name);
-
- gimp_item_set_visible (GIMP_ITEM (merge_layer), TRUE, TRUE);
-
/* End the merge undo group */
gimp_image_undo_group_end (image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]