[gimp] Issue #4218 - Color>Invert doesn't work on saved selection channel ...



commit 0e29fc1b2109e3dea55597625c9cea5bc0a96018
Author: Ell <ell_se yahoo com>
Date:   Mon Nov 11 18:54:03 2019 +0200

    Issue #4218 - Color>Invert doesn't work on saved selection channel ...
    
    ... or copied RGB channel
    
    In gimp_drawable_merge_filter(), make sure the drawable's source
    node is constructed before applying the operation.  The
    construction of the source node connects the drawable's filter
    stack to the udnerlying source node (usually, the buffer-source
    node), which we rely on when calling
    gimp_gegl_apply_cached_operation(), since we pass
    connect_src_buffer == FALSE.  Otherwise, the operation is applied
    to an empty input, instead of the drawable content.

 app/core/gimpdrawable-filters.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/app/core/gimpdrawable-filters.c b/app/core/gimpdrawable-filters.c
index c786c3d228..3cdb218050 100644
--- a/app/core/gimpdrawable-filters.c
+++ b/app/core/gimpdrawable-filters.c
@@ -215,6 +215,11 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
 
   gimp_projection_stop_rendering (gimp_image_get_projection (image));
 
+  /* make sure we have a source node - this connects the filter stack to the
+   * underlying source node
+   */
+  (void) gimp_drawable_get_source_node (drawable);
+
   if (gimp_gegl_apply_cached_operation (gimp_drawable_get_buffer (drawable),
                                         progress, undo_desc,
                                         gimp_filter_get_node (filter), FALSE,


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