From 0157a9581ee01e4f757fb348bdeb3632dbbcd1b3 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 13 Dec 2025 00:03:38 +0100 Subject: [PATCH] Issue #14442: undo crops layer rendering out of its off-border effects. This was happening in multiple cases, such as undoing a "Rasterize filters" action, but also with a "Layer to Image Size" being undone, and probably any other undo cases. In particular here the culprit was that upon undoing, we were setting the GimpApplicator's "gimp:compose-crop" node, while it was a "gegl:nop" before. We must be careful not to set a crop unexpectedly when the node was not set already, explicitly. --- app/core/gimpdrawablefilter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/core/gimpdrawablefilter.c b/app/core/gimpdrawablefilter.c index 4ee6141daf..2b16adedf2 100644 --- a/app/core/gimpdrawablefilter.c +++ b/app/core/gimpdrawablefilter.c @@ -1331,12 +1331,13 @@ gimp_drawable_filter_layer_mask_freeze (GimpDrawableFilter *filter) filter); } -void gimp_drawable_filter_refresh_crop (GimpDrawableFilter *filter, - GeglRectangle *rect) +void +gimp_drawable_filter_refresh_crop (GimpDrawableFilter *filter, + GeglRectangle *rect) { g_return_if_fail (GIMP_IS_DRAWABLE_FILTER (filter)); - if (rect) + if (rect && filter->crop_enabled) { /* Some filters have built-in width/height properties that limit * the buffer size. If they have one in those roles, we can update