Issue #15824: better detect the first filter.

Ah my previous commit was working fine with a selection in the "Use the
selection as input" case, but was still hanging when "Use the entire
layer as input" was chosen.

The detection of whether we were the first filter was not working fine
when adding a new filter. Now this should work in all cases.

I don't revert the previous commit, because I think it's fine anyway.
When we have a selection, unconditionally adding a cropping-before node
on the selection boundaries seems logical to me.
Hopefully it doesn't bring back any of the cropping issues we had on
filters, but so far I could not reproduce any.
This commit is contained in:
Jehan 2026-02-25 15:44:29 +01:00
parent d91a8b2abe
commit 75e665f0ed

View file

@ -1429,8 +1429,12 @@ gimp_drawable_filter_sync_region (GimpDrawableFilter *filter)
filters = gimp_drawable_get_filters (filter->drawable);
/* The first test is because the filter might not be added yet. */
if (GIMP_LIST (filters)->queue->tail != NULL &&
filter == GIMP_LIST (filters)->queue->tail->data)
if (GIMP_LIST (filters)->queue->tail == NULL)
{
first_filter = TRUE;
}
else if (GIMP_LIST (filters)->queue->tail != NULL &&
filter == GIMP_LIST (filters)->queue->tail->data)
{
GimpDrawableFilter *next_filter = NULL;