[gegl] Remove proxy-nop nodes with their pads



commit b8efb0c94ee97698d81896afd543ba0cdbde48fe
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sun Feb 2 03:19:22 2014 -0800

    Remove proxy-nop nodes with their pads

 gegl/graph/gegl-node.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index f9647ba..e2adf72 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -451,6 +451,8 @@ void
 gegl_node_remove_pad (GeglNode *self,
                       GeglPad  *pad)
 {
+  GeglNode *pad_node;
+
   g_return_if_fail (GEGL_IS_NODE (self));
   g_return_if_fail (GEGL_IS_PAD (pad));
 
@@ -462,6 +464,12 @@ gegl_node_remove_pad (GeglNode *self,
   if (gegl_pad_is_input (pad))
     self->input_pads = g_slist_remove (self->input_pads, pad);
 
+  pad_node = gegl_pad_get_node (pad);
+
+  /* This was a proxy pad, also remove the nop node */
+  if (self != pad_node)
+    gegl_node_remove_child (self, pad_node);
+
   g_object_unref (pad);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]