From 6934a0d2eb8a7bc17bb3ec1b46fbbc82b3312357 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 24 Aug 2009 22:38:16 +0200 Subject: [PATCH] Make sure all group layers' projections switch to GEGL with the main projection --- app/actions/view-commands.c | 16 ++++++++++++++++ app/core/gimpgrouplayer.c | 3 +++ 2 files changed, 19 insertions(+) diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c index b5d12c4d9d..16a648d3f5 100644 --- a/app/actions/view-commands.c +++ b/app/actions/view-commands.c @@ -30,6 +30,7 @@ #include "core/gimp.h" #include "core/gimpcontext.h" #include "core/gimpimage.h" +#include "core/gimpgrouplayer.h" #include "core/gimpprojection.h" #include "display/gimpdisplay.h" @@ -690,6 +691,8 @@ view_use_gegl_cmd_callback (GtkAction *action, GimpImage *image; GimpDisplay *display; GimpDisplayShell *shell; + GList *layers; + GList *list; gboolean active; return_if_no_image (image, data); return_if_no_display (display, data); @@ -699,6 +702,19 @@ view_use_gegl_cmd_callback (GtkAction *action, active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); image->projection->use_gegl = active; + + layers = gimp_image_get_layer_list (image); + + for (list = layers; list; list = g_list_next (list)) + { + GimpLayer *layer = list->data; + + if (GIMP_IS_GROUP_LAYER (layer)) + GIMP_GROUP_LAYER (layer)->projection->use_gegl = active; + } + + g_list_free (layers); + gimp_image_update (image, 0, 0, image->width, image->height); gimp_image_flush (image); } diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c index 12f7912557..cf7ea01bd3 100644 --- a/app/core/gimpgrouplayer.c +++ b/app/core/gimpgrouplayer.c @@ -592,6 +592,9 @@ gimp_group_layer_new (GimpImage *image) gimp_image_base_type_with_alpha (image), _("Group Layer")); + if (gimp_image_get_projection (image)->use_gegl) + group->projection->use_gegl = TRUE; + return GIMP_LAYER (group); }