From b89f47ca3943bf4b065d2fea5b9fe79d75916eb4 Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Sun, 23 Mar 2014 13:52:06 -0400 Subject: [PATCH] For caching state to work, G_mindist must be a static variable. --- lib/circogen/circular.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/circogen/circular.c b/lib/circogen/circular.c index f268b7c6a..395034a82 100644 --- a/lib/circogen/circular.c +++ b/lib/circogen/circular.c @@ -29,10 +29,9 @@ static void initGraphAttrs(Agraph_t * g, circ_state * state) static Agraph_t *rootg; static attrsym_t *N_artpos; static attrsym_t *N_root; - static double min_dist; + static attrsym_t *G_mindist; static char *rootname; Agraph_t *rg; - attrsym_t *G_mindist; node_t *n = agfstnode(g); rg = agraphof(ORIGN(n)); @@ -44,10 +43,9 @@ static void initGraphAttrs(Agraph_t * g, circ_state * state) N_root = agattr(rootg,AGNODE, "root", NULL); } rootname = agget(rootg, "root"); - min_dist = late_double(rootg, G_mindist, MINDIST, 0.0); initBlocklist(&state->bl); state->orderCount = 1; - state->min_dist = min_dist; + state->min_dist = late_double(rootg, G_mindist, MINDIST, 0.0); state->N_artpos = N_artpos; state->N_root = N_root; state->rootname = rootname; -- 2.40.0