Skip to content

Commit d2d1af4

Browse files
DanySKCopilot
andcommitted
Update alchemist-swingui/src/main/java/it/unibo/alchemist/boundary/swingui/monitor/impl/Generic2DDisplay.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7b738a8 commit d2d1af4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

alchemist-swingui/src/main/java/it/unibo/alchemist/boundary/swingui/monitor/impl/Generic2DDisplay.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,10 @@ private void drawObstacles(final Graphics2D g) {
389389
/*
390390
* This currently draws all obstacles, even when they are fully outside the viewport.
391391
*/
392-
obstacles.parallelStream()
392+
final List<Shape> obstacleShapes = obstacles.parallelStream()
393393
.map(this::convertObstacle)
394-
.forEachOrdered(g::fill);
394+
.collect(Collectors.toList());
395+
obstacleShapes.forEach(g::fill);
395396
}
396397

397398
private void drawLinks(final Graphics2D g, final Map<Node<T>, Point> onView) {

0 commit comments

Comments
 (0)