[gimp/gimp-2-6] Bug 604508 - gimp-layer-new-from-visible should work from updated projection



commit 86f299bacd80cceb91023a124cd78c255853443f
Author: Michael Natterer <mitch gimp org>
Date:   Mon Dec 14 14:19:10 2009 +0100

    Bug 604508 - gimp-layer-new-from-visible should work from updated projection
    
    Call gimp_pickable_flush(projection) before creating a new layer from it.
    (cherry picked and modified from commit 335597ce7d92c22e9ecb90c21176b6b43dae5459)

 app/actions/layers-commands.c |    3 +++
 app/pdb/layer-cmds.c          |    3 +++
 tools/pdbgen/pdb/layer.pdb    |    3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c
index b37bad1..55d93ce 100644
--- a/app/actions/layers-commands.c
+++ b/app/actions/layers-commands.c
@@ -41,6 +41,7 @@
 #include "core/gimplayer.h"
 #include "core/gimplayer-floating-sel.h"
 #include "core/gimplayermask.h"
+#include "core/gimppickable.h"
 #include "core/gimpprojection.h"
 #include "core/gimptoolinfo.h"
 #include "core/gimpundostack.h"
@@ -346,6 +347,8 @@ layers_new_from_visible_cmd_callback (GtkAction *action,
 
   projection = gimp_image_get_projection (image);
 
+  gimp_pickable_flush (GIMP_PICKABLE (projection));
+
   layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection),
                                      image,
                                      gimp_image_base_type_with_alpha (image),
diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c
index 1d64b69..ece86e7 100644
--- a/app/pdb/layer-cmds.c
+++ b/app/pdb/layer-cmds.c
@@ -35,6 +35,7 @@
 #include "core/gimplayer.h"
 #include "core/gimplayermask.h"
 #include "core/gimpparamspecs.h"
+#include "core/gimppickable.h"
 #include "core/gimpprogress.h"
 #include "core/gimpprojection.h"
 
@@ -114,6 +115,8 @@ layer_new_from_visible_invoker (GimpProcedure      *procedure,
     {
       GimpProjection *projection = gimp_image_get_projection (image);
 
+      gimp_pickable_flush (GIMP_PICKABLE (projection));
+
       layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection),
                                          dest_image,
                                          gimp_image_base_type_with_alpha (dest_image),
diff --git a/tools/pdbgen/pdb/layer.pdb b/tools/pdbgen/pdb/layer.pdb
index ad646ef..7b69e44 100644
--- a/tools/pdbgen/pdb/layer.pdb
+++ b/tools/pdbgen/pdb/layer.pdb
@@ -97,6 +97,8 @@ HELP
 {
   GimpProjection *projection = gimp_image_get_projection (image);
 
+  gimp_pickable_flush (GIMP_PICKABLE (projection));
+
   layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection),
                                      dest_image,
                                      gimp_image_base_type_with_alpha (dest_image),
@@ -1059,6 +1061,7 @@ CODE
               "core/gimp.h"
               "core/gimpimage-undo.h"
               "core/gimpitem-linked.h"
+              "core/gimppickable.h"
               "core/gimpprogress.h"
               "core/gimpprojection.h"
               "gimppdb-utils.h"



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