From 7e0e1a71709b495d2d8e868b732a2494f0f7cd24 Mon Sep 17 00:00:00 2001 From: Soeren Domroes Date: Thu, 21 Sep 2023 16:35:36 +0200 Subject: [PATCH] radial: Correct recursive remvoe overlap. --- .../intermediate/overlaps/RadiusExtensionOverlapRemoval.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/org.eclipse.elk.alg.radial/src/org/eclipse/elk/alg/radial/intermediate/overlaps/RadiusExtensionOverlapRemoval.java b/plugins/org.eclipse.elk.alg.radial/src/org/eclipse/elk/alg/radial/intermediate/overlaps/RadiusExtensionOverlapRemoval.java index 32bf49bd81..3f43ce84a5 100644 --- a/plugins/org.eclipse.elk.alg.radial/src/org/eclipse/elk/alg/radial/intermediate/overlaps/RadiusExtensionOverlapRemoval.java +++ b/plugins/org.eclipse.elk.alg.radial/src/org/eclipse/elk/alg/radial/intermediate/overlaps/RadiusExtensionOverlapRemoval.java @@ -74,19 +74,17 @@ public void extend(final ElkNode graph, final List nodes, IElkProgressM Set nextLevelNodes = RadialUtil.getNextLevelNodeSet(nodes); // Calculate the moved distance which is the amount all children and grandchildren have to be moved. int index = 1; - while (!nextLevelNodes.isEmpty()) { + if (!nextLevelNodes.isEmpty()) { for(ElkNode nextLevelNode : nextLevelNodes) { moveNode(nextLevelNode, movedDistance); } progressMonitor.logGraph(graph, "Child movement " + index); - nextLevelNodes = RadialUtil.getNextLevelNodeSet(new ArrayList<>(nextLevelNodes)); index++; } if (sorter != null) { sorter.sort(new ArrayList<>(nextLevelNodes)); } - progressMonitor.logGraph(graph, "After ancestor movement"); extend(graph, new ArrayList<>(nextLevelNodes), progressMonitor); } }