[gimp] gimp_image_item_list_filter(): actually honor the passed parameters
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] gimp_image_item_list_filter(): actually honor the passed parameters
- Date: Thu, 27 Aug 2009 17:49:07 +0000 (UTC)
commit f05c5ecfdc458c6fe952ce76d906c06fc24cae2a
Author: Michael Natterer <mitch gimp org>
Date: Thu Aug 27 19:36:22 2009 +0200
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.
app/core/gimpimage-item-list.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/app/core/gimpimage-item-list.c b/app/core/gimpimage-item-list.c
index 5360c2f..5262ede 100644
--- a/app/core/gimpimage-item-list.c
+++ b/app/core/gimpimage-item-list.c
@@ -252,19 +252,22 @@ gimp_image_item_list_filter (const GimpItem *exclude,
if (! list)
return NULL;
- if (exclude)
- list = gimp_image_item_list_remove_children (list, exclude);
-
- for (l = list; l; l = g_list_next (l))
+ if (remove_children)
{
- GimpItem *item = l->data;
- GList *next;
+ if (exclude)
+ 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;
+
+ next = gimp_image_item_list_remove_children (g_list_next (l), item);
- l->next = next;
- if (next)
- next->prev = l;
+ l->next = next;
+ if (next)
+ next->prev = l;
+ }
}
if (remove_locked)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]