]> granicus.if.org Git - graphviz/commitdiff
Fix for accidentally creating parallel edge in constraint graph
authornorth <devnull@localhost>
Wed, 1 Feb 2006 20:59:32 +0000 (20:59 +0000)
committernorth <devnull@localhost>
Wed, 1 Feb 2006 20:59:32 +0000 (20:59 +0000)
when a cluster has a label.

lib/dotgen/position.c

index 67e40ca484db3a315fe9ef0de57585237fc61c87..ce123ec84a8ad357f51256e748780b90928d536f 100644 (file)
@@ -346,10 +346,14 @@ static void make_edge_pairs(graph_t * g)
 static void contain_clustnodes(graph_t * g)
 {
     int c;
+    edge_t     *e;
 
     if (g != g->root) {
        contain_nodes(g);
-       make_aux_edge(GD_ln(g), GD_rn(g), 1, 128);      /* clust compaction edge */
+       if ((e = find_fast_edge(GD_ln(g),GD_rn(g))))    /* maybe from lrvn()?*/
+           ED_weight(e) += 128;
+       else
+           make_aux_edge(GD_ln(g), GD_rn(g), 1, 128);  /* clust compaction edge */
     }
     for (c = 1; c <= GD_n_cluster(g); c++)
        contain_clustnodes(GD_clust(g)[c]);