[gimp] app: clip floating selection to layers with no alpha channel
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: clip floating selection to layers with no alpha channel
- Date: Thu, 3 Oct 2019 19:26:59 +0000 (UTC)
commit 1c67395c21aa0d4177ec7a3eaab889e46e7fee81
Author: Ell <ell_se yahoo com>
Date: Thu Oct 3 22:09:43 2019 +0300
app: clip floating selection to layers with no alpha channel
Alawys clip a floating selection to its base layer, if the layer
has no alpha channel. This avoids arbitrarily filling the extended
regions of the layer with, or compositing the floating selection
against, black color.
This is a temporary solution. Ideally, we'd automatically add an
alpha channel to the layer as necessary.
app/core/gimpdrawable-floating-selection.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app/core/gimpdrawable-floating-selection.c b/app/core/gimpdrawable-floating-selection.c
index 53a887a9ca..f16d4bfcb0 100644
--- a/app/core/gimpdrawable-floating-selection.c
+++ b/app/core/gimpdrawable-floating-selection.c
@@ -337,7 +337,8 @@ gimp_drawable_sync_fs_filter (GimpDrawable *drawable)
gimp_item_get_offset (GIMP_ITEM (fs), &fs_off_x, &fs_off_y);
if (gimp_item_get_clip (GIMP_ITEM (drawable), GIMP_TRANSFORM_RESIZE_ADJUST) ==
- GIMP_TRANSFORM_RESIZE_CLIP)
+ GIMP_TRANSFORM_RESIZE_CLIP ||
+ ! gimp_drawable_has_alpha (drawable))
{
gegl_node_set (
private->fs_crop_node,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]