From: Marko Luukkainen Date: Thu, 6 Apr 2017 15:02:33 +0000 (+0300) Subject: Fix introduced ConcurrentModficationException X-Git-Tag: v1.31.0~19 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=98caf73c954a9d8d5b80b13f3ca4e02fee92d87d;p=simantics%2Finterop.git Fix introduced ConcurrentModficationException refs #7045 Change-Id: Ib93731f246193505ec1bddc4e38928312b11981d --- diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/editor/ModelUpdateEditor.java b/org.simantics.interop.update/src/org/simantics/interop/update/editor/ModelUpdateEditor.java index 0881a7b..4c17299 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/editor/ModelUpdateEditor.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/editor/ModelUpdateEditor.java @@ -558,7 +558,8 @@ public abstract class ModelUpdateEditor extends Composite{ public void perform(WriteGraph graph) throws DatabaseException { Layer0Utils.addCommentMetadata(graph, "Apply selected model updates"); graph.markUndoPoint(); - for (Pair mod : updateList.getSelected()) { + HashSet> changes = new HashSet<>(updateList.getSelected()); + for (Pair mod : changes) { updateList.removeChange(mod); applyLiteralChange(graph, mod); }