mirror of https://github.com/GNOME/gimp.git
gimp_image_item_list_filter(): actually honor the passed parameters
Gah, I added these parameters for a reason, so do *not* remove all child items if remove_children is FALSE.
This commit is contained in:
parent
19a168cb9d
commit
f05c5ecfdc
|
@ -252,19 +252,22 @@ gimp_image_item_list_filter (const GimpItem *exclude,
|
||||||
if (! list)
|
if (! list)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (exclude)
|
if (remove_children)
|
||||||
list = gimp_image_item_list_remove_children (list, exclude);
|
|
||||||
|
|
||||||
for (l = list; l; l = g_list_next (l))
|
|
||||||
{
|
{
|
||||||
GimpItem *item = l->data;
|
if (exclude)
|
||||||
GList *next;
|
list = gimp_image_item_list_remove_children (list, exclude);
|
||||||
|
|
||||||
next = gimp_image_item_list_remove_children (g_list_next (l), item);
|
for (l = list; l; l = g_list_next (l))
|
||||||
|
{
|
||||||
|
GimpItem *item = l->data;
|
||||||
|
GList *next;
|
||||||
|
|
||||||
l->next = next;
|
next = gimp_image_item_list_remove_children (g_list_next (l), item);
|
||||||
if (next)
|
|
||||||
next->prev = l;
|
l->next = next;
|
||||||
|
if (next)
|
||||||
|
next->prev = l;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remove_locked)
|
if (remove_locked)
|
||||||
|
|
Loading…
Reference in New Issue