]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix typical connection synchronization for multiple-connection terminals
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 May 2021 11:53:18 +0000 (14:53 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 May 2021 11:53:18 +0000 (14:53 +0300)
gitlab #718

bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java

index 8a0b1ddbca77e0f81fd283d8445c715e8c2e5adb..7addab3f5794ce5b05de174a8820e57fd77b86cd 100644 (file)
@@ -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);