]> granicus.if.org Git - graphviz/commitdiff
Fix neato -n to update bbox if nodes are adjusted.
authorerg <devnull@localhost>
Wed, 21 May 2008 15:21:47 +0000 (15:21 +0000)
committererg <devnull@localhost>
Wed, 21 May 2008 15:21:47 +0000 (15:21 +0000)
lib/neatogen/neatoinit.c

index c8c5c62ebfbd846c14f33f8c110e0cdfc8947b06..d788bd144a8df550c9e5c130631ff0fd4b67d84b 100644 (file)
@@ -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.