]> granicus.if.org Git - graphviz/commitdiff
Fix mode=hier in neato
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 2 Jun 2020 14:22:22 +0000 (16:22 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 2 Jun 2020 15:39:01 +0000 (17:39 +0200)
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1726.

The bug was introduced in 443592f1e8950df88f6df9c71b60667c9ad98006

lib/neatogen/neatoinit.c

index 7d9e3c464c2ef3b9285b6bcdb6b6e6f45c3188bd..c2c36914e91a035a35f03dea7c4dc23e13af0a71 100644 (file)
@@ -1351,10 +1351,10 @@ neatoLayout(Agraph_t * mg, Agraph_t * g, int layoutMode, int layoutModel,
        MaxIter = atoi(str);
     else if (layoutMode == MODE_MAJOR)
        MaxIter = DFLT_ITERATIONS;
-    else if (layoutMode == MODE_KK)
-       MaxIter = 100 * agnnodes(g);
     else if (layoutMode == MODE_SGD)
        MaxIter = 30;
+    else
+       MaxIter = 100 * agnnodes(g);
 
     nG = scan_graph_mode(g, layoutMode);
     if ((nG < 2) || (MaxIter < 0))