From f58e9b32d111dcfafb94b620a0fa3a72304aaade Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Mon, 18 Nov 2024 17:05:38 +0100 Subject: [PATCH] To avoid freezing, forbids displaying full network Signed-off-by: Florian Dupuy --- .../diagram/viewer/nad/NetworkAreaDiagramController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diagram-viewer/src/main/java/com/powsybl/diagram/viewer/nad/NetworkAreaDiagramController.java b/diagram-viewer/src/main/java/com/powsybl/diagram/viewer/nad/NetworkAreaDiagramController.java index caf98b1..563a1f0 100644 --- a/diagram-viewer/src/main/java/com/powsybl/diagram/viewer/nad/NetworkAreaDiagramController.java +++ b/diagram-viewer/src/main/java/com/powsybl/diagram/viewer/nad/NetworkAreaDiagramController.java @@ -79,7 +79,7 @@ protected String call() { private static Predicate getVoltageLevelFilter(Network network, NetworkAreaDiagramModel model, Container container) { return switch (container.getContainerType()) { - case NETWORK -> VoltageLevelFilter.NO_FILTER; + case NETWORK -> null; case SUBSTATION -> VoltageLevelFilter.createVoltageLevelsDepthFilter(network, ((Substation) container).getVoltageLevelStream().map(VoltageLevel::getId).toList(), model.getDepth()); case VOLTAGE_LEVEL -> VoltageLevelFilter.createVoltageLevelDepthFilter(network, container.getId(), model.getDepth()); };