Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@ public CompletableFuture<NetworkModificationsResult> moveModifications(
Set<UUID> selectedCompositeUuids = modificationRepository.findExistingCompositeModificationIds(modificationsToMoveUuids);

// Get all children of selected composites (to skip sub-modifications that move with their ancestor)
Set<UUID> childrenOfSelectedComposites = selectedCompositeUuids.isEmpty()
Set<UUID> childrenOfSelectedComposites = new HashSet<>(selectedCompositeUuids.isEmpty()
? Set.of()
: new HashSet<>(networkModificationRepository.findAllChildrenUuids(new ArrayList<>(selectedCompositeUuids)));
: new HashSet<>(networkModificationRepository.findAllChildrenUuids(new ArrayList<>(selectedCompositeUuids))));
childrenOfSelectedComposites.removeAll(selectedCompositeUuids);

// Sub-modifications: selected UUIDs that are not composite roots and not already covered by a selected ancestor
List<UUID> subModificationUuids = modificationsToMoveUuids.stream()
.filter(uuid -> !selectedCompositeUuids.contains(uuid))
.filter(uuid -> !childrenOfSelectedComposites.contains(uuid))
.toList();
for (UUID uuid : subModificationUuids) {
Expand Down
Loading