diff --git a/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java b/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java index ccaefbe2d..e4ef49bc3 100644 --- a/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java +++ b/plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/SortByInputModelProcessor.java @@ -82,6 +82,11 @@ public void process(final LGraph graph, final IElkProgressMonitor progressMonito progressMonitor.log("Node " + node + " ports: " + node.getPorts()); } } + // Sort nodes after port sorting to also sort dummy feedback nodes from the current layer correctly. + comparator = new ModelOrderNodeComparator(previousLayer, + graph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_STRATEGY), + graph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY)); + Collections.sort(layer.getNodes(), comparator); progressMonitor.log("Layer " + layerIndex + ": " + layer); layerIndex++;