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



commit 80ac740b603ad658e0557b7e2b57bf776c005387
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.

 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 001ab63..d02f24c 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -3833,7 +3833,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 3ea7415..a52963c 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -1086,8 +1086,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 3a390a8..b634d9c 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -1122,13 +1122,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]