From fac344acac27eb0b119bfbcceef84ec0d0066eb8 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Fri, 11 Nov 2011 18:06:25 -0500 Subject: [PATCH] On output, recurse down the subgraph tree even if the subgraph is "irrelevant", as it may contain non-irrelevant subgraphs. --- lib/cgraph/write.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/cgraph/write.c b/lib/cgraph/write.c index 32452ff1e..59a95c9e5 100644 --- a/lib/cgraph/write.c +++ b/lib/cgraph/write.c @@ -388,11 +388,14 @@ static int write_subgs(Agraph_t * g, iochan_t * ofile) Agraph_t *subg; for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { - if (irrelevant_subgraph(subg)) - continue; - CHKRV(write_hdr(subg, ofile, FALSE)); - CHKRV(write_body(subg, ofile)); - CHKRV(write_trl(subg, ofile)); + if (irrelevant_subgraph(subg)) { + write_subgs(subg, ofile); + } + else { + CHKRV(write_hdr(subg, ofile, FALSE)); + CHKRV(write_body(subg, ofile)); + CHKRV(write_trl(subg, ofile)); + } } return 0; } -- 2.40.0