When an item is removed, emit "removed" on all its children

This commit is contained in:
Michael Natterer 2009-08-01 19:21:43 +02:00
parent ee022e907e
commit 464ce841aa
1 changed files with 7 additions and 0 deletions

View File

@ -528,10 +528,17 @@ gimp_item_sync_offset_node (GimpItem *item)
void
gimp_item_removed (GimpItem *item)
{
GimpContainer *children;
g_return_if_fail (GIMP_IS_ITEM (item));
item->removed = TRUE;
children = gimp_viewable_get_children (GIMP_VIEWABLE (item));
if (children)
gimp_container_foreach (children, (GFunc) gimp_item_removed, NULL);
g_signal_emit (item, gimp_item_signals[REMOVED], 0);
}