From: erg Date: Wed, 21 May 2008 15:21:47 +0000 (+0000) Subject: Fix neato -n to update bbox if nodes are adjusted. X-Git-Tag: LAST_LIBGRAPH~32^2~4036 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8eb5edb28c5a52de89664341954e2bcb40561681;p=graphviz Fix neato -n to update bbox if nodes are adjusted. --- diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index c8c5c62eb..d788bd144 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -611,8 +611,10 @@ int init_nop(Agraph_t * g, int adjust) if (adjust && Nop == 1) adjustNodes(g); - /* If g does not have a good "bb" attribute, compute it. */ - if (!chkBB(g, G_bb)) + /* If g does not have a good "bb" attribute or we adjusted the nodes, + * compute it. + */ + if (!chkBB(g, G_bb) || (adjust && Nop == 1)) compute_bb(g); /* At this point, all bounding boxes should be correctly defined.