[gimp] Allow merging down a group layer



commit e79c3c9bd76cb4b44a8b230c46f48837e4160648
Author: Michael Natterer <mitch gimp org>
Date:   Mon Sep 21 19:21:03 2009 +0200

    Allow merging down a group layer
    
    There is no reason to disallow this, the merged-down group layer will
    simply disappear from the image just as a normal layer, and its
    projection composited with the layer below.

 app/actions/layers-actions.c |    6 ++----
 app/core/gimpimage-merge.c   |    7 -------
 2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/app/actions/layers-actions.c b/app/actions/layers-actions.c
index 0361990..40fa049 100644
--- a/app/actions/layers-actions.c
+++ b/app/actions/layers-actions.c
@@ -596,11 +596,9 @@ layers_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("layers-lower-to-bottom",  layer && !fs && !ac && next);
 
   SET_SENSITIVE ("layers-anchor",           layer &&  fs && !ac);
-  SET_SENSITIVE ("layers-merge-down",       layer && !fs && !ac &&
-                                            !children && next_visible);
+  SET_SENSITIVE ("layers-merge-down",       layer && !fs && !ac && next_visible);
   SET_VISIBLE   ("layers-merge-group",      children);
-  SET_SENSITIVE ("layers-merge-group",      layer && !fs && !ac &&
-                                            children);
+  SET_SENSITIVE ("layers-merge-group",      layer && !fs && !ac && children);
   SET_SENSITIVE ("layers-merge-layers",     layer && !fs && !ac);
   SET_SENSITIVE ("layers-flatten-image",    layer && !fs && !ac);
 
diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c
index 7771fdd..5968681 100644
--- a/app/core/gimpimage-merge.c
+++ b/app/core/gimpimage-merge.c
@@ -191,13 +191,6 @@ gimp_image_merge_down (GimpImage      *image,
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
   g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
-  if (gimp_viewable_get_children (GIMP_VIEWABLE (current_layer)))
-    {
-      g_set_error_literal (error, 0, 0,
-                           _("Cannot merge down a layer group."));
-      return NULL;
-    }
-
   for (list = gimp_item_get_container_iter (GIMP_ITEM (current_layer));
        list;
        list = g_list_next (list))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]