From 03058fc4824c5c875167efb5182623166ac7af40 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Fri, 9 Dec 2016 15:28:41 -0500 Subject: [PATCH] Fix verbose printing. First, we are not printing the graph depth, but the maximum number of steps to the center. Second, we can't use SLEAF if the root is specified, since SLEAF is not calculated in that case. --- lib/twopigen/circle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/twopigen/circle.c b/lib/twopigen/circle.c index 8bc950e35..9117908d8 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -422,10 +422,10 @@ Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center) if (!center) center = findCenterNode(sg); - if (Verbose) - fprintf(stderr, "root = %s depth = %d\n", agnameof(center), SLEAF(center)-1); maxNStepsToCenter = setParentNodes(sg,center); + if (Verbose) + fprintf(stderr, "root = %s max steps to root = %d\n", agnameof(center), maxNStepsToCenter); if (maxNStepsToCenter < 0) { agerr(AGERR, "twopi: use of weight=0 creates disconnected component.\n"); return center; -- 2.40.0