[gimp] Issue #5992: Mask to Selection isn't selecting the right place.



commit 6f09e099d604550e2fad51900d88a5750c7f9d53
Author: Jehan <jehan girinstud io>
Date:   Thu Nov 26 16:18:04 2020 +0100

    Issue #5992: Mask to Selection isn't selecting the right place.

 app/core/gimpchannel-combine.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpchannel-combine.c b/app/core/gimpchannel-combine.c
index db2a428abf..24ea70ec1f 100644
--- a/app/core/gimpchannel-combine.c
+++ b/app/core/gimpchannel-combine.c
@@ -580,9 +580,15 @@ gimp_channel_combine_items (GimpChannel    *mask,
   for (iter = items; iter; iter = iter->next)
     {
       if (! GIMP_IS_LAYER (iter->data))
-        gimp_channel_combine_buffer (channel,
-                                     gimp_drawable_get_buffer (GIMP_DRAWABLE (iter->data)),
-                                     GIMP_CHANNEL_OP_ADD, 0, 0);
+        {
+          gint offset_x;
+          gint offset_y;
+
+          gimp_item_get_offset (iter->data, &offset_x, &offset_y);
+          gimp_channel_combine_buffer (channel,
+                                       gimp_drawable_get_buffer (GIMP_DRAWABLE (iter->data)),
+                                       GIMP_CHANNEL_OP_ADD, offset_x, offset_y);
+        }
     }
 
   gimp_channel_combine_buffer (mask,


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