[gimp] Don't spoil the names of duplicated groups' children with "copy"s
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Don't spoil the names of duplicated groups' children with "copy"s
- Date: Tue, 25 Aug 2009 19:31:26 +0000 (UTC)
commit d87337226285a8914e7c3d9491c7e0d3d417f4de
Author: Michael Natterer <mitch gimp org>
Date: Tue Aug 25 16:05:39 2009 +0200
Don't spoil the names of duplicated groups' children with "copy"s
app/core/gimpgrouplayer.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 4442eae..b40d3d7 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -346,11 +346,27 @@ gimp_group_layer_duplicate (GimpItem *item,
list;
list = g_list_next (list), position++)
{
- GimpItem *child = list->data;
- GimpItem *new_child;
+ GimpItem *child = list->data;
+ GimpItem *new_child;
+ GimpLayerMask *mask;
new_child = gimp_item_duplicate (child, G_TYPE_FROM_INSTANCE (child));
+ gimp_object_set_name (GIMP_OBJECT (new_child),
+ gimp_object_get_name (GIMP_OBJECT (child)));
+
+ mask = gimp_layer_get_mask (GIMP_LAYER (child));
+
+ if (mask)
+ {
+ GimpLayerMask *new_mask;
+
+ new_mask = gimp_layer_get_mask (GIMP_LAYER (new_child));
+
+ gimp_object_set_name (GIMP_OBJECT (new_mask),
+ gimp_object_get_name (GIMP_OBJECT (mask)));
+ }
+
gimp_viewable_set_parent (GIMP_VIEWABLE (new_child),
GIMP_VIEWABLE (new_group));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]