From: north Date: Fri, 26 Nov 2010 16:17:00 +0000 (+0000) Subject: Fix for problem with "ignored" nodes in cluster. This won't be an issue X-Git-Tag: LAST_LIBGRAPH~32^2~1137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f2a5e103f34a3331a423326a5c21abcddce53f4;p=graphviz Fix for problem with "ignored" nodes in cluster. This won't be an issue when the new level assignment code goes in, if that ever happens. --- diff --git a/lib/dotgen/cluster.c b/lib/dotgen/cluster.c index 69666c845..ff4772480 100644 --- a/lib/dotgen/cluster.c +++ b/lib/dotgen/cluster.c @@ -351,7 +351,7 @@ void expand_cluster(graph_t * subg) void mark_clusters(graph_t * g) { int c; - node_t *n, *vn; + node_t *n, *nn, *vn; edge_t *orig, *e; graph_t *clust; @@ -364,11 +364,13 @@ void mark_clusters(graph_t * g) for (c = 1; c <= GD_n_cluster(g); c++) { clust = GD_clust(g)[c]; - for (n = agfstnode(clust); n; n = agnxtnode(clust, n)) { + for (n = agfstnode(clust); n; n = nn) { + nn = agnxtnode(clust,n); if (ND_ranktype(n) != NORMAL) { agerr(AGWARN, - "%s was already in a rankset, ignored in cluster %s\n", + "%s was already in a rankset, deleted from cluster %s\n", agnameof(n), agnameof(g)); + agdelete(clust,n); continue; } UF_setname(n, GD_leader(clust));