[gimp] Make sure all group layers' projections switch to GEGL with the main projection
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Make sure all group layers' projections switch to GEGL with the main projection
- Date: Mon, 24 Aug 2009 20:39:23 +0000 (UTC)
commit 6934a0d2eb8a7bc17bb3ec1b46fbbc82b3312357
Author: Michael Natterer <mitch gimp org>
Date: Mon Aug 24 22:38:16 2009 +0200
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(+), 0 deletions(-)
---
diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c
index b5d12c4..16a648d 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 12f7912..cf7ea01 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]