Commit 074469e6 authored by Martin Nordholts's avatar Martin Nordholts

gegl: Handle sinks in gegl_dot_add_node_and_dependencies()

parent 4e0cdb91
......@@ -251,6 +251,7 @@ gegl_dot_add_node_and_dependencies (GString *string,
GeglNode *node)
{
GeglDotVisitor *dot_visitor;
GeglPad *pad;
gpointer context_id = string;
dot_visitor = g_object_new (GEGL_TYPE_DOT_VISITOR,
......@@ -265,8 +266,27 @@ gegl_dot_add_node_and_dependencies (GString *string,
GEGL_VISITABLE (node));
/* Add the edges */
pad = gegl_node_get_pad (node, "output");
if (! pad)
{
pad = gegl_node_get_pad (node, "input");
if (pad)
{
/* This is a sink node, we need to add these edges manually
* since no pad depends on this input pad */
GSList *iter;
for (iter = pad->connections; iter; iter = g_slist_next (iter))
{
GeglConnection *connection = iter->data;
gegl_dot_util_add_connection (string, connection);
}
}
}
gegl_visitor_dfs_traverse (GEGL_VISITOR (dot_visitor),
GEGL_VISITABLE (gegl_node_get_pad (node, "output")));
GEGL_VISITABLE (pad));
g_object_unref (dot_visitor);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment