]> granicus.if.org Git - graphviz/commitdiff
Fix bug 2599: fdp produces unnecessarily large clusters
authorEmden Gansner <emdenrg@google.com>
Mon, 23 May 2016 17:51:16 +0000 (13:51 -0400)
committerEmden Gansner <emdenrg@google.com>
Mon, 23 May 2016 17:51:16 +0000 (13:51 -0400)
lib/fdpgen/layout.c

index 7b333a6df6c3956cc001c371a68aeb3bce2633e7..e85bff86cc54027004f0b9609c7119eb8f8f5ee7 100644 (file)
@@ -893,8 +893,10 @@ void layout(graph_t * g, layout_info * infop)
     cc = pg = findCComp(dg, &c_cnt, &pinned);
 
     while ((cg = *pg++)) {
+       node_t* nxtnode;
        fdp_tLayout(cg, &xpms);
-       for (n = agfstnode(cg); n; n = agnxtnode(cg, n)) {
+       for (n = agfstnode(cg); n; n = nxtnode) {
+           nxtnode = agnxtnode(cg, n);
            if (ND_clust(n)) {
                pointf pt;
                sg = expandCluster(n, cg);      /* attach ports to sg */