From ff7ff0f4981f9dc25c90f78588d28f7907f70f0e Mon Sep 17 00:00:00 2001 From: north Date: Wed, 23 Jul 2008 19:10:29 +0000 Subject: [PATCH] nested clusters --- lib/dotgen/rank.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/dotgen/rank.c b/lib/dotgen/rank.c index ec4f917d7..508a77ce4 100644 --- a/lib/dotgen/rank.c +++ b/lib/dotgen/rank.c @@ -266,7 +266,7 @@ collapse_cluster(graph_t * g, graph_t * subg) /* Execute union commands for "same rank" subgraphs and clusters. */ static void -collapse_sets(graph_t * g) +collapse_sets(graph_t *rg, graph_t *g) { int c; graph_t *mg, *subg; @@ -281,10 +281,11 @@ collapse_sets(graph_t * g) c = rank_set_class(subg); if (c) { if ((c == CLUSTER) && CL_type == LOCAL) - collapse_cluster(g, subg); + collapse_cluster(rg, subg); else - collapse_rankset(g, subg, c); + collapse_rankset(rg, subg, c); } + else collapse_sets(rg,subg); /* mark nodes with ordered edges so their leaves are not collapsed */ if (agget(subg, "ordering")) @@ -465,7 +466,7 @@ void dot_rank(graph_t * g) attrsym_t* N_level; #endif edgelabel_ranks(g); - collapse_sets(g); + collapse_sets(g,g); /*collapse_leaves(g); */ class1(g); p = minmax_edges(g); -- 2.50.1