mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
core: Don't merge floating selection as filter
Floating selections are added to the same stack as non-destructive filters. While the GUI prevents merging filters when there is a floating selection, gimp_drawable_merge_filters () did not explicitly prevent this. This patch replaces the while loop to merge filters with a for loop, and explicitly checks if the item in the stack is a drawable filter (and not a temporary one).
This commit is contained in:
parent
2baab5aa74
commit
ae02db90a3
1 changed files with 12 additions and 4 deletions
|
@ -328,12 +328,20 @@ gimp_drawable_merge_filters (GimpDrawable *drawable)
|
|||
g_clear_object (&buffer);
|
||||
}
|
||||
|
||||
while ((list = GIMP_LIST (drawable->private->filter_stack)->queue->tail))
|
||||
for (list = GIMP_LIST (drawable->private->filter_stack)->queue->tail;
|
||||
list;
|
||||
list = list->prev)
|
||||
{
|
||||
if (GIMP_IS_DRAWABLE_FILTER (list->data) &&
|
||||
! gimp_drawable_filter_get_temporary (list->data))
|
||||
|
||||
{
|
||||
gimp_image_undo_push_filter_remove (gimp_item_get_image (GIMP_ITEM (drawable)),
|
||||
_("Merge filter"), drawable, list->data);
|
||||
|
||||
gimp_drawable_remove_filter (drawable, GIMP_FILTER (list->data));
|
||||
_("Merge filter"),
|
||||
drawable, list->data);
|
||||
gimp_drawable_remove_filter (drawable,
|
||||
GIMP_FILTER (list->data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue