[gimp/gimp-2-8] Bug 678732 - gimp-image-insert-layer inserts into a wrong place...



commit 209116fcadd7b1c44397a906f196c6afa5607575
Author: Michael Natterer <mitch gimp org>
Date:   Sat Aug 4 02:18:15 2012 +0200

    Bug 678732 - gimp-image-insert-layer inserts into a wrong place...
    
    Fix the docs, the function does what it's supposed to do.  Passing
    "0, -1" actually means "insert where the ui would insert" and is
    supposed to be used when e.g. scripts create layers.
    (cherry picked from commit e620eb8cefe565d372959eba3aee8dfbb8c5734f)

 app/pdb/image-cmds.c       |    2 +-
 libgimp/gimpimage_pdb.c    |    5 +++--
 tools/pdbgen/pdb/image.pdb |   15 ++++++++-------
 3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index e539632..942e026 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -3669,7 +3669,7 @@ register_image_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-insert-layer",
                                      "Add the specified layer to the image.",
-                                     "This procedure adds the specified layer to the image at the given position. If the specified parent is a valid layer group (See 'gimp-item-is-group' and 'gimp-layer-group-new') then the layer is added inside the group. If the parent is 0, the layer is added inside the main stack, outside of any group. The position argument specifies the location of the layer inside the stack (or the group, if a valid parent was supplied), starting from the top (0) and increasing. If the position is specified as -1 and the parent is specified as 0, then the layer is inserted above the active layer. The layer type must be compatible with the image base type.",
+                                     "This procedure adds the specified layer to the image at the given position. If the specified parent is a valid layer group (See 'gimp-item-is-group' and 'gimp-layer-group-new') then the layer is added inside the group. If the parent is 0, the layer is added inside the main stack, outside of any group. The position argument specifies the location of the layer inside the stack (or the group, if a valid parent was supplied), starting from the top (0) and increasing. If the position is specified as -1 and the parent is specified as 0, then the layer is inserted above the active layer, or inside the group if the active layer is a layer group. The layer type must be compatible with the image base type.",
                                      "Spencer Kimball & Peter Mattis",
                                      "Spencer Kimball & Peter Mattis",
                                      "1995-1996",
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 6ee0c0f..f54d24f 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -1012,8 +1012,9 @@ gimp_image_add_layer (gint32 image_ID,
  * specifies the location of the layer inside the stack (or the group,
  * if a valid parent was supplied), starting from the top (0) and
  * increasing. If the position is specified as -1 and the parent is
- * specified as 0, then the layer is inserted above the active layer.
- * The layer type must be compatible with the image base type.
+ * specified as 0, then the layer is inserted above the active layer,
+ * or inside the group if the active layer is a layer group. The layer
+ * type must be compatible with the image base type.
  *
  * Returns: TRUE on success.
  **/
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index e8cf38d..a84aea3 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -1074,13 +1074,14 @@ sub image_insert_layer {
 This procedure adds the specified layer to the image at the given
 position. If the specified parent is a valid layer group (See
 gimp_item_is_group() and gimp_layer_group_new()) then the layer is
-added inside the group. If the parent is 0, the layer is added
-inside the main stack, outside of any group. The position argument
-specifies the location of the layer inside the stack (or the group, if
-a valid parent was supplied), starting from the top (0) and increasing.
-If the position is specified as -1 and the parent is specified as 0,
-then the layer is inserted above the active layer. The layer type must
-be compatible with the image base type.
+added inside the group. If the parent is 0, the layer is added inside
+the main stack, outside of any group. The position argument specifies
+the location of the layer inside the stack (or the group, if a valid
+parent was supplied), starting from the top (0) and increasing.  If
+the position is specified as -1 and the parent is specified as 0, then
+the layer is inserted above the active layer, or inside the group if
+the active layer is a layer group. The layer type must be compatible
+with the image base type.
 HELP
 
     &std_pdb_misc;



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