Skip to content

Commit 04b8c38

Browse files
author
Dennis Labordus
authored
Merge pull request #25 from com-pas/dependabot/maven/com.powsybl-powsybl-single-line-diagram-core-2.6.0
Bump powsybl-single-line-diagram-core from 2.5.1 to 2.6.0
2 parents a3126d5 + 53cfc51 commit 04b8c38

File tree

4 files changed

+167
-332
lines changed

4 files changed

+167
-332
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SPDX-License-Identifier: Apache-2.0
2828

2929
<quarkus.platform.version>2.6.0.Final</quarkus.platform.version>
3030
<slf4j.version>1.7.32</slf4j.version>
31-
<powsybl.sld.version>2.5.1</powsybl.sld.version>
31+
<powsybl.sld.version>2.6.0</powsybl.sld.version>
3232
<gson.version>2.8.9</gson.version>
3333
<openpojo.version>0.9.1</openpojo.version>
3434
</properties>

service/src/main/java/org/lfenergy/compas/scl/auto/alignment/service/SclAutoAlignmentDiagramLabelProvider.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ public class SclAutoAlignmentDiagramLabelProvider implements DiagramLabelProvide
1919

2020
public SclAutoAlignmentDiagramLabelProvider(SubstationGraph graph) {
2121
this.busLabels = new HashMap<>();
22-
LabelPosition labelPosition = new LabelPosition("default", 0, -5, true, 0);
23-
graph.getNodes().forEach(v ->
24-
v.getNodes().forEach(n -> {
25-
List<NodeLabel> labels = new ArrayList<>();
26-
labels.add(new NodeLabel(stripLabel(n.getId()), labelPosition, null));
27-
busLabels.put(n, labels);
28-
})
22+
graph.getNodes().forEach(voltageLevelGraph ->
23+
voltageLevelGraph.getNodes().forEach(this::addNode)
2924
);
25+
graph.getMultiTermNodes().forEach(this::addNode);
26+
}
27+
28+
private void addNode(Node node) {
29+
LabelPosition labelPosition = new LabelPosition("default", 0, -5, true, 0);
30+
List<NodeLabel> labels = new ArrayList<>();
31+
labels.add(new NodeLabel(stripLabel(node.getId()), labelPosition, null));
32+
busLabels.put(node, labels);
3033
}
3134

3235
@Override

0 commit comments

Comments
 (0)