[gimp] app: fix child offsets of a pasted layer group



commit 5ea5458938e612cdefb00105d6e79518b29c7793
Author: Ell <ell_se yahoo com>
Date:   Fri Mar 17 05:10:07 2017 -0400

    app: fix child offsets of a pasted layer group
    
    Use gimp_item_translate() instead of gimp_item_set_offset() to set
    a pasted item's position, so that the offsets of pasted layer group
    children are updated correctly.  Otherwise, only the group itself
    moves, while its children remain positioned relative to the top-left
    corner of the image.

 app/core/gimp-edit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c
index 336a21b..e7fb960 100644
--- a/app/core/gimp-edit.c
+++ b/app/core/gimp-edit.c
@@ -433,7 +433,7 @@ gimp_edit_paste (GimpImage     *image,
                               viewport_height,
                               &offset_x,
                               &offset_y);
-  gimp_item_set_offset (GIMP_ITEM (layer), offset_x, offset_y);
+  gimp_item_translate (GIMP_ITEM (layer), offset_x, offset_y, FALSE);
 
   gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
                                C_("undo-type", "Paste"));


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