From: Tuukka Lehtonen Date: Fri, 28 May 2021 11:53:18 +0000 (+0300) Subject: Fix typical connection synchronization for multiple-connection terminals X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=bd14da9c15b5f9ecb88a5faa00ac57f3a9c353fe;p=simantics%2Fplatform.git Fix typical connection synchronization for multiple-connection terminals gitlab #718 --- diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java index 8a0b1ddbc..7addab3f5 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java @@ -944,8 +944,7 @@ public class SyncTypicalTemplatesToInstances extends WriteRequest { if (templateNode != null) { Resource isConnectedTo = graph.getPossibleInverse(toNode.getPredicate()); if (isConnectedTo != null) { - Resource templateConnector = graph.getPossibleObject(templateNode, isConnectedTo); - if (templateConnector != null) { + for (Resource templateConnector : graph.getObjects(templateNode, isConnectedTo)) { Resource connectionOfTemplateConnector = ConnectionUtil.tryGetConnection(graph, templateConnector); if (sourceConnection.equals(connectionOfTemplateConnector)) { s2t.put(templateConnector, targetConnector);