]> granicus.if.org Git - graphviz/commitdiff
Fix cgraph code in dot related to virtual nodes. In particular, avoid calling agsubno...
authorEmden Gansner <erg@research.att.com>
Fri, 14 Oct 2011 19:54:56 +0000 (15:54 -0400)
committerEmden Gansner <erg@research.att.com>
Fri, 14 Oct 2011 19:54:56 +0000 (15:54 -0400)
virtual node.

lib/dotgen/cluster.c
lib/dotgen/fastgr.c

index 1b49308f312bf19a417390c91f83f1fc385640a3..70343f4ebbc6cd88b63f3b76d4edc0815e4c9a37 100644 (file)
@@ -286,10 +286,9 @@ merge_ranks(graph_t * subg)
 #ifndef WITH_CGRAPH
            v->graph = subg->root;
 #else /* WITH_CGRAPH */
-//         agraphof(v) = agroot(subg);
-               agsubnode(subg, v, 1);
-
-
+       /* real nodes automatically have v->root = root graph */
+           if (ND_node_type(v) == VIRTUAL)
+               v->root = root;
 #endif /* WITH_CGRAPH */
            delete_fast_node(subg, v);
            fast_node(agroot(subg), v);
index 2eb380fac67c66e4023d1e30ad1d70a6625f50b8..dd1e9c928cb232ab8be7a21bb962ea16a95eba43 100644 (file)
@@ -254,7 +254,6 @@ node_t *virtual_node(graph_t * g)
 #else /* WITH_CGRAPH */
 //  agnameof(n) = "virtual";
     AGTYPE(n) = AGNODE;
-    n->root = g;
     n->base.data = NEW(Agnodeinfo_t);
     n->root = g;
 #endif /* WITH_CGRAPH */