diff options
Diffstat (limited to 'src/gtkext/graph/dot.c')
-rw-r--r-- | src/gtkext/graph/dot.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gtkext/graph/dot.c b/src/gtkext/graph/dot.c index 18c4800..e7bbf84 100644 --- a/src/gtkext/graph/dot.c +++ b/src/gtkext/graph/dot.c @@ -69,7 +69,7 @@ graph_layout *create_graph_layout(char *cmds) - //printf("CMDS =======\n%s\n\n=================\n", cmds); + printf("CMDS =======\n%s\n\n=================\n", cmds); ret = gvLayout(result->context, result->graph, "dot"); if (ret != 0) goto cdl_error; @@ -161,7 +161,12 @@ void place_nodes_of_graph_layout(const graph_layout *layout, GtkGraphView *view, for (iter = agfstnode(layout->graph); iter != NULL; iter = agnxtnode(layout->graph, iter)) { node = find_graph_node_by_name(nodes, count, iter->name); - g_graph_node_place(node, view, iter->u.coord.x, height - iter->u.coord.y); + + /* S'il s'agit d'un noeud artificiel créé pour dot uniquement... */ + if (node == NULL) continue; + + g_graph_node_place_old(node, view, iter->u.coord.x, height - iter->u.coord.y); + } } @@ -233,6 +238,9 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz node = find_graph_node_by_name(nodes, ncount, agtail(eiter)->name); + /* S'il s'agit d'un noeud artificiel créé pour dot uniquement... */ + if (node == NULL) continue; + g_graph_node_connect(node, lines->list[0].list[0].x, height - lines->list[0].list[0].y, |